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
Copy file name to clipboardExpand all lines: datafusion/sqllogictest/test_files/joins.slt
+48Lines changed: 48 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -4742,3 +4742,51 @@ drop table person;
4742
4742
4743
4743
statement count 0
4744
4744
drop table orders;
4745
+
4746
+
# Create tables for testing compound field access in JOIN conditions
4747
+
statement ok
4748
+
CREATE TABLE compound_field_table_t
4749
+
AS VALUES
4750
+
({r: 'a', c: 1}),
4751
+
({r: 'b', c: 2.3});
4752
+
4753
+
statement ok
4754
+
CREATE TABLE compound_field_table_u
4755
+
AS VALUES
4756
+
({r: 'a', c: 1}),
4757
+
({r: 'b', c: 2.3});
4758
+
4759
+
# Test compound field access in JOIN condition with table aliases
4760
+
query ??
4761
+
SELECT * FROM compound_field_table_t tee JOIN compound_field_table_u you ON tee.column1['r'] = you.column1['r']
4762
+
----
4763
+
{r: a, c: 1.0} {r: a, c: 1.0}
4764
+
{r: b, c: 2.3} {r: b, c: 2.3}
4765
+
4766
+
# Test compound field access in JOIN condition without table aliases
4767
+
query ??
4768
+
SELECT * FROM compound_field_table_t JOIN compound_field_table_u ON compound_field_table_t.column1['r'] = compound_field_table_u.column1['r']
4769
+
----
4770
+
{r: a, c: 1.0} {r: a, c: 1.0}
4771
+
{r: b, c: 2.3} {r: b, c: 2.3}
4772
+
4773
+
# Test compound field access with numeric field access
4774
+
query ??
4775
+
SELECT * FROM compound_field_table_t tee JOIN compound_field_table_u you ON tee.column1['c'] = you.column1['c']
4776
+
----
4777
+
{r: a, c: 1.0} {r: a, c: 1.0}
4778
+
{r: b, c: 2.3} {r: b, c: 2.3}
4779
+
4780
+
# Test compound field access with mixed field types
4781
+
query ??
4782
+
SELECT * FROM compound_field_table_t tee JOIN compound_field_table_u you ON tee.column1['r'] = you.column1['r'] AND tee.column1['c'] = you.column1['c']
0 commit comments