Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Oct 13, 2024
1 parent 4a57773 commit 820b9ab
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 @@ -374,28 +374,28 @@ STORED AS PARQUET LOCATION 'test_files/scratch/parquet/binary_as_string.parquet'
query T?
select arrow_typeof(binary_col), binary_col from binary_as_string_default;
----
Binary 616161
Binary 626262
Binary 636363
Binary 646464
Binary 656565
Binary 666666
Binary 676767
Binary 686868
Binary 696969
BinaryView 616161
BinaryView 626262
BinaryView 636363
BinaryView 646464
BinaryView 656565
BinaryView 666666
BinaryView 676767
BinaryView 686868
BinaryView 696969

# Run an explain plan to show the cast happens in the plan (a CAST is needed for the predicate)
query TT
EXPLAIN SELECT binary_col FROM binary_as_string_default WHERE binary_col LIKE '%a%';
----
logical_plan
01)Filter: CAST(binary_as_string_default.binary_col AS Utf8) LIKE Utf8("%a%")
02)--TableScan: binary_as_string_default projection=[binary_col], partial_filters=[CAST(binary_as_string_default.binary_col AS Utf8) LIKE Utf8("%a%")]
01)Filter: CAST(binary_as_string_default.binary_col AS Utf8View) LIKE Utf8View("%a%")
02)--TableScan: binary_as_string_default projection=[binary_col], partial_filters=[CAST(binary_as_string_default.binary_col AS Utf8View) LIKE Utf8View("%a%")]
physical_plan
01)CoalesceBatchesExec: target_batch_size=8192
02)--FilterExec: CAST(binary_col@0 AS Utf8) LIKE %a%
02)--FilterExec: CAST(binary_col@0 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], predicate=CAST(binary_col@0 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], predicate=CAST(binary_col@0 AS Utf8View) LIKE %a%


statement ok
Expand All @@ -412,23 +412,23 @@ OPTIONS ('binary_as_string' 'true');
query TT
select arrow_typeof(binary_col), binary_col from binary_as_string_option;
----
Utf8 aaa
Utf8 bbb
Utf8 ccc
Utf8 ddd
Utf8 eee
Utf8 fff
Utf8 ggg
Utf8 hhh
Utf8 iii
Utf8View aaa
Utf8View bbb
Utf8View ccc
Utf8View ddd
Utf8View eee
Utf8View fff
Utf8View ggg
Utf8View hhh
Utf8View iii

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

0 comments on commit 820b9ab

Please sign in to comment.