You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
f"""CREATE TABLE test_different_table_types.writable_rest USING iceberg WITH (catalog='rest') AS SELECT 1 AS a""",
598
+
pg_conn,
599
+
)
600
+
run_command(
601
+
f"""CREATE TABLE test_different_table_types.writable_object_store USING iceberg WITH (catalog='object_store') AS SELECT 2 AS a""",
602
+
pg_conn,
603
+
)
604
+
605
+
run_command(
606
+
f"""CREATE TABLE test_different_table_types.postgres_catalog_iceberg_test USING iceberg AS SELECT 3 as a""",
607
+
pg_conn,
608
+
)
609
+
610
+
run_command(
611
+
f"""CREATE TABLE test_different_table_types.heap_test AS SELECT 4 as a""",
612
+
pg_conn,
613
+
)
614
+
615
+
pg_conn.commit()
616
+
617
+
run_command(
618
+
f"""CREATE TABLE test_different_table_types.readable_rest() USING iceberg WITH (catalog='rest', read_only=True, catalog_table_name='writable_rest')""",
619
+
pg_conn,
620
+
)
621
+
pg_conn.commit()
622
+
623
+
run_command(
624
+
f"""CREATE TABLE test_different_table_types.writable_rest_2 USING iceberg WITH (catalog='rest') AS
625
+
626
+
SELECT * FROM test_different_table_types.writable_rest
627
+
UNION ALL
628
+
SELECT * FROM test_different_table_types.writable_object_store
629
+
UNION ALL
630
+
SELECT * FROM test_different_table_types.postgres_catalog_iceberg_test
631
+
UNION ALL
632
+
SELECT * FROM test_different_table_types.heap_test
633
+
UNION ALL
634
+
SELECT * FROM test_different_table_types.readable_rest
635
+
""",
636
+
pg_conn,
637
+
)
638
+
pg_conn.commit()
639
+
640
+
res=run_query(
641
+
"SELECT * FROM test_different_table_types.writable_rest_2 ORDER BY a DESC",
642
+
pg_conn,
643
+
)
644
+
assertres== [[4], [3], [2], [1], [1]]
645
+
646
+
run_command(
647
+
"""
648
+
UPDATE test_different_table_types.writable_rest_2 bar SET a = foo.a + 1
649
+
FROM ( SELECT * FROM test_different_table_types.writable_rest
650
+
UNION ALL
651
+
SELECT * FROM test_different_table_types.writable_object_store
652
+
UNION ALL
653
+
SELECT * FROM test_different_table_types.postgres_catalog_iceberg_test
654
+
UNION ALL
655
+
SELECT * FROM test_different_table_types.heap_test
656
+
UNION ALL
657
+
SELECT * FROM test_different_table_types.readable_rest
658
+
659
+
) as foo WHERE foo.a = bar.a """,
660
+
pg_conn,
661
+
)
662
+
663
+
res=run_query(
664
+
"SELECT * FROM test_different_table_types.writable_rest_2 ORDER BY a DESC",
665
+
pg_conn,
666
+
)
667
+
assertres== [[5], [4], [3], [2], [2]]
668
+
669
+
pg_conn.commit()
670
+
res=run_query(
671
+
"SELECT * FROM test_different_table_types.writable_rest_2 ORDER BY a DESC",
0 commit comments