Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Oct 17, 2024
1 parent 0fdb393 commit 6112175
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions datafusion/sqllogictest/test_files/parquet.slt
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,15 @@ select
arrow_typeof(binaryview_col), binaryview_col
FROM binary_as_string_default;
----
Binary 616161 Binary 616161 Binary 616161
Binary 626262 Binary 626262 Binary 626262
Binary 636363 Binary 636363 Binary 636363
Binary 646464 Binary 646464 Binary 646464
Binary 656565 Binary 656565 Binary 656565
Binary 666666 Binary 666666 Binary 666666
Binary 676767 Binary 676767 Binary 676767
Binary 686868 Binary 686868 Binary 686868
Binary 696969 Binary 696969 Binary 696969
BinaryView 616161 BinaryView 616161 BinaryView 616161
BinaryView 626262 BinaryView 626262 BinaryView 626262
BinaryView 636363 BinaryView 636363 BinaryView 636363
BinaryView 646464 BinaryView 646464 BinaryView 646464
BinaryView 656565 BinaryView 656565 BinaryView 656565
BinaryView 666666 BinaryView 666666 BinaryView 666666
BinaryView 676767 BinaryView 676767 BinaryView 676767
BinaryView 686868 BinaryView 686868 BinaryView 686868
BinaryView 696969 BinaryView 696969 BinaryView 696969

# Run an explain plan to show the cast happens in the plan (a CAST is needed for the predicates)
query TT
Expand All @@ -405,13 +405,13 @@ EXPLAIN
binaryview_col LIKE '%a%';
----
logical_plan
01)Filter: CAST(binary_as_string_default.binary_col AS Utf8) LIKE Utf8("%a%") AND CAST(binary_as_string_default.largebinary_col AS Utf8) LIKE Utf8("%a%") AND CAST(binary_as_string_default.binaryview_col AS Utf8) LIKE Utf8("%a%")
02)--TableScan: binary_as_string_default projection=[binary_col, largebinary_col, binaryview_col], partial_filters=[CAST(binary_as_string_default.binary_col AS Utf8) LIKE Utf8("%a%"), CAST(binary_as_string_default.largebinary_col AS Utf8) LIKE Utf8("%a%"), CAST(binary_as_string_default.binaryview_col AS Utf8) LIKE Utf8("%a%")]
01)Filter: CAST(binary_as_string_default.binary_col AS Utf8View) LIKE Utf8View("%a%") AND CAST(binary_as_string_default.largebinary_col AS Utf8View) LIKE Utf8View("%a%") AND CAST(binary_as_string_default.binaryview_col AS Utf8View) LIKE Utf8View("%a%")
02)--TableScan: binary_as_string_default projection=[binary_col, largebinary_col, binaryview_col], partial_filters=[CAST(binary_as_string_default.binary_col AS Utf8View) LIKE Utf8View("%a%"), CAST(binary_as_string_default.largebinary_col AS Utf8View) LIKE Utf8View("%a%"), CAST(binary_as_string_default.binaryview_col AS Utf8View) LIKE Utf8View("%a%")]
physical_plan
01)CoalesceBatchesExec: target_batch_size=8192
02)--FilterExec: CAST(binary_col@0 AS Utf8) LIKE %a% AND CAST(largebinary_col@1 AS Utf8) LIKE %a% AND CAST(binaryview_col@2 AS Utf8) LIKE %a%
02)--FilterExec: CAST(binary_col@0 AS Utf8View) LIKE %a% AND CAST(largebinary_col@1 AS Utf8View) LIKE %a% AND CAST(binaryview_col@2 AS Utf8View) LIKE %a%
03)----RepartitionExec: partitioning=RoundRobinBatch(2), input_partitions=1
04)------ParquetExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch/parquet/binary_as_string.parquet]]}, projection=[binary_col, largebinary_col, binaryview_col], predicate=CAST(binary_col@0 AS Utf8) LIKE %a% AND CAST(largebinary_col@1 AS Utf8) LIKE %a% AND CAST(binaryview_col@2 AS Utf8) LIKE %a%
04)------ParquetExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch/parquet/binary_as_string.parquet]]}, projection=[binary_col, largebinary_col, binaryview_col], predicate=CAST(binary_col@0 AS Utf8View) LIKE %a% AND CAST(largebinary_col@1 AS Utf8View) LIKE %a% AND CAST(binaryview_col@2 AS Utf8View) LIKE %a%


statement ok
Expand All @@ -432,15 +432,15 @@ select
arrow_typeof(binaryview_col), binaryview_col
FROM binary_as_string_option;
----
Utf8 aaa Utf8 aaa Utf8 aaa
Utf8 bbb Utf8 bbb Utf8 bbb
Utf8 ccc Utf8 ccc Utf8 ccc
Utf8 ddd Utf8 ddd Utf8 ddd
Utf8 eee Utf8 eee Utf8 eee
Utf8 fff Utf8 fff Utf8 fff
Utf8 ggg Utf8 ggg Utf8 ggg
Utf8 hhh Utf8 hhh Utf8 hhh
Utf8 iii Utf8 iii Utf8 iii
Utf8View aaa Utf8View aaa Utf8View aaa
Utf8View bbb Utf8View bbb Utf8View bbb
Utf8View ccc Utf8View ccc Utf8View ccc
Utf8View ddd Utf8View ddd Utf8View ddd
Utf8View eee Utf8View eee Utf8View eee
Utf8View fff Utf8View fff Utf8View fff
Utf8View ggg Utf8View ggg Utf8View ggg
Utf8View hhh Utf8View hhh Utf8View hhh
Utf8View iii Utf8View iii Utf8View iii

# Run an explain plan to show the cast happens in the plan (there should be no casts)
query TT
Expand All @@ -453,8 +453,8 @@ EXPLAIN
binaryview_col LIKE '%a%';
----
logical_plan
01)Filter: binary_as_string_option.binary_col LIKE Utf8("%a%") AND binary_as_string_option.largebinary_col LIKE Utf8("%a%") AND binary_as_string_option.binaryview_col LIKE Utf8("%a%")
02)--TableScan: binary_as_string_option projection=[binary_col, largebinary_col, binaryview_col], partial_filters=[binary_as_string_option.binary_col LIKE Utf8("%a%"), binary_as_string_option.largebinary_col LIKE Utf8("%a%"), binary_as_string_option.binaryview_col LIKE Utf8("%a%")]
01)Filter: binary_as_string_option.binary_col LIKE Utf8View("%a%") AND binary_as_string_option.largebinary_col LIKE Utf8View("%a%") AND binary_as_string_option.binaryview_col LIKE Utf8View("%a%")
02)--TableScan: binary_as_string_option projection=[binary_col, largebinary_col, binaryview_col], partial_filters=[binary_as_string_option.binary_col LIKE Utf8View("%a%"), binary_as_string_option.largebinary_col LIKE Utf8View("%a%"), binary_as_string_option.binaryview_col LIKE Utf8View("%a%")]
physical_plan
01)CoalesceBatchesExec: target_batch_size=8192
02)--FilterExec: binary_col@0 LIKE %a% AND largebinary_col@1 LIKE %a% AND binaryview_col@2 LIKE %a%
Expand Down

0 comments on commit 6112175

Please sign in to comment.