Apache DataFusion SQL Query Engine
Parse Sqllogictest column types from physical schema (#11929)
Jonah Gao63ca7142fb8b
diff --git a/datafusion/sqllogictest/src/engines/datafusion_engine/runner.rs b/datafusion/sqllogictest/src/engines/datafusion_engine/runner.rsindex afd0a241ca..5c24b49cfe 100644--- a/datafusion/sqllogictest/src/engines/datafusion_engine/runner.rs+++ b/datafusion/sqllogictest/src/engines/datafusion_engine/runner.rs@@ -15,10 +15,13 @@// specific language governing permissions and limitations// under the License.+use std::sync::Arc;use std::{path::PathBuf, time::Duration};use arrow::record_batch::RecordBatch;use async_trait::async_trait;+use datafusion::physical_plan::common::collect;+use datafusion::physical_plan::execute_stream;use datafusion::prelude::SessionContext;use log::info;use sqllogictest::DBOutput;@@ -69,9 +72,12 @@ impl sqllogictest::AsyncDB for DataFusion {async fn run_query(ctx: &SessionContext, sql: impl Into<String>) -> Result<DFOutput> {let df = ctx.sql(sql.into().as_str()).await?;+ let task_ctx = Arc::new(df.task_ctx());+ let plan = df.create_physical_plan().await?;- let types = normalize::convert_schema_to_types(df.schema().fields());- let results: Vec<RecordBatch> = df.collect().await?;+ let stream = execute_stream(plan, task_ctx)?;+ let types = normalize::convert_schema_to_types(stream.schema().fields());+ let results: Vec<RecordBatch> = collect(stream).await?;let rows = normalize::convert_batches(results)?;if rows.is_empty() && types.is_empty() {diff --git a/datafusion/sqllogictest/test_files/coalesce.slt b/datafusion/sqllogictest/test_files/coalesce.sltindex d16b79734c..0e977666cc 100644--- a/datafusion/sqllogictest/test_files/coalesce.slt+++ b/datafusion/sqllogictest/test_files/coalesce.slt@@ -23,7 +23,7 @@ select coalesce(1, 2, 3);1# test with first null-query ?T+query ITselect coalesce(null, 3, 2, 1), arrow_typeof(coalesce(null, 3, 2, 1));----3 Int64@@ -35,7 +35,7 @@ select coalesce(null, null);NULL# cast to float-query IT+query RTselectcoalesce(1, 2.0),arrow_typeof(coalesce(1, 2.0))@@ -51,7 +51,7 @@ select----2 Float64-query IT+query RTselectcoalesce(1, arrow_cast(2.0, 'Float32')),arrow_typeof(coalesce(1, arrow_cast(2.0, 'Float32')))@@ -177,7 +177,7 @@ select2 Decimal256(22, 2)# coalesce string-query T?+query TTselectcoalesce('', 'test'),coalesce(null, 'test');@@ -246,7 +246,7 @@ drop table test1statement okcreate table t(c varchar) as values ('a'), (null);-query TT+query ?Tselectcoalesce(c, arrow_cast('b', 'Dictionary(Int32, Utf8)')),arrow_typeof(coalesce(c, arrow_cast('b', 'Dictionary(Int32, Utf8)')))@@ -295,7 +295,7 @@ statement okdrop table t;# test dict(int32, int8)-query I+query ?select coalesce(34, arrow_cast(123, 'Dictionary(Int32, Int8)'));----34diff --git a/datafusion/sqllogictest/test_files/copy.slt b/datafusion/sqllogictest/test_files/copy.sltindex ff7040926c..ebb3ca2173 100644--- a/datafusion/sqllogictest/test_files/copy.slt+++ b/datafusion/sqllogictest/test_files/copy.slt@@ -20,13 +20,13 @@ statement okcreate table source_table(col1 integer, col2 varchar) as values (1, 'Foo'), (2, 'Bar');# Copy to directory as multiple files-query IT+query ICOPY source_table TO 'test_files/scratch/copy/table/' STORED AS parquet OPTIONS ('format.compression' 'zstd(10)');----2# Copy to directory as partitioned files-query IT+query ICOPY source_table TO 'test_files/scratch/copy/partitioned_table1/' STORED AS parquet PARTITIONED BY (col2) OPTIONS ('format.compression' 'zstd(10)');----2@@ -53,7 +53,7 @@ select * from validate_partitioned_parquet_bar order by col1;2# Copy to directory as partitioned files-query ITT+query ICOPY (values (1, 'a', 'x'), (2, 'b', 'y'), (3, 'c', 'z')) TO 'test_files/scratch/copy/partitioned_table2/' STORED AS parquet PARTITIONED BY (column2, column3)OPTIONS ('format.compression' 'zstd(10)');----@@ -81,7 +81,7 @@ select * from validate_partitioned_parquet_a_x order by column1;1# Copy to directory as partitioned files-query TTT+query ICOPY (values ('1', 'a', 'x'), ('2', 'b', 'y'), ('3', 'c', 'z')) TO 'test_files/scratch/copy/partitioned_table3/' STORED AS parquet PARTITIONED BY (column1, column3)OPTIONS ('format.compression' 'zstd(10)');----@@ -167,7 +167,7 @@ physical_plan02)--MemoryExec: partitions=1, partition_sizes=[1]# Copy to directory as partitioned files with keep_partition_by_columns enabled-query TT+query ICOPY (values ('1', 'a'), ('2', 'b'), ('3', 'c')) TO 'test_files/scratch/copy/partitioned_table4/' STORED AS parquet PARTITIONED BY (column1)OPTIONS (execution.keep_partition_by_columns true);----@@ -184,7 +184,7 @@ select column1, column2 from validate_partitioned_parquet4 order by column1,colu1 a# Copy more files to directory via query-query IT+query ICOPY (select * from source_table UNION ALL select * from source_table) to 'test_files/scratch/copy/table/' STORED AS PARQUET;----4@@ -203,7 +203,7 @@ select * from validate_parquet;1 Foo2 Bar-query ?+query Icopy (values (struct(timestamp '2021-01-01 01:00:01', 1)), (struct(timestamp '2022-01-01 01:00:01', 2)),(struct(timestamp '2023-01-03 01:00:01', 3)), (struct(timestamp '2024-01-01 01:00:01', 4)))to 'test_files/scratch/copy/table_nested2/' STORED AS PARQUET;@@ -221,7 +221,7 @@ select * from validate_parquet_nested2;{c0: 2023-01-03T01:00:01, c1: 3}{c0: 2024-01-01T01:00:01, c1: 4}-query ??+query ICOPY(values (struct ('foo', (struct ('foo', make_array(struct('a',1), struct('b',2))))), make_array(timestamp '2023-01-01 01:00:01',timestamp '2023-01-01 01:00:01')),(struct('bar', (struct ('foo', make_array(struct('aa',10), struct('bb',20))))), make_array(timestamp '2024-01-01 01:00:01', timestamp '2024-01-01 01:00:01')))@@ -239,7 +239,7 @@ select * from validate_parquet_nested;{c0: foo, c1: {c0: foo, c1: [{c0: a, c1: 1}, {c0: b, c1: 2}]}} [2023-01-01T01:00:01, 2023-01-01T01:00:01]{c0: bar, c1: {c0: foo, c1: [{c0: aa, c1: 10}, {c0: bb, c1: 20}]}} [2024-01-01T01:00:01, 2024-01-01T01:00:01]-query ?+query Icopy (values ([struct('foo', 1), struct('bar', 2)]))to 'test_files/scratch/copy/array_of_struct/'STORED AS PARQUET;@@ -255,7 +255,7 @@ select * from validate_array_of_struct;----[{c0: foo, c1: 1}, {c0: bar, c1: 2}]-query ?+query Icopy (values (struct('foo', [1,2,3], struct('bar', [2,3,4]))))to 'test_files/scratch/copy/struct_with_array/' STORED AS PARQUET;----@@ -272,7 +272,7 @@ select * from validate_struct_with_array;# Copy parquet with all supported statement overrides-query IT+query ICOPY source_tableTO 'test_files/scratch/copy/table_with_options/'STORED AS PARQUET@@ -378,7 +378,7 @@ select * from validate_parquet_with_options;2 Bar# Copy from table to single file-query IT+query ICOPY source_table to 'test_files/scratch/copy/table.parquet';----2@@ -394,7 +394,7 @@ select * from validate_parquet_single;2 Bar# copy from table to folder of compressed json files-query IT+query ICOPY source_table to 'test_files/scratch/copy/table_json_gz' STORED AS JSON OPTIONS ('format.compression' gzip);----2@@ -410,7 +410,7 @@ select * from validate_json_gz;2 Bar# copy from table to folder of compressed csv files-query IT+query ICOPY source_table to 'test_files/scratch/copy/table_csv' STORED AS CSV OPTIONS ('format.has_header' false, 'format.compression' gzip);----2@@ -426,7 +426,7 @@ select * from validate_csv;2 Bar# Copy from table to single csv-query IT+query ICOPY source_table to 'test_files/scratch/copy/table.csv';----2@@ -442,7 +442,7 @@ select * from validate_single_csv;2 Bar# Copy from table to folder of json-query IT+query ICOPY source_table to 'test_files/scratch/copy/table_json' STORED AS JSON;----2@@ -458,7 +458,7 @@ select * from validate_json;2 Bar# Copy from table to single json file-query IT+query ICOPY source_table to 'test_files/scratch/copy/table.json' STORED AS JSON ;----2@@ -474,7 +474,7 @@ select * from validate_single_json;2 Bar# COPY csv files with all options set-query IT+query ICOPY source_tableto 'test_files/scratch/copy/table_csv_with_options'STORED AS CSV OPTIONS (@@ -499,7 +499,7 @@ select * from validate_csv_with_options;2;Bar# Copy from table to single arrow file-query IT+query ICOPY source_table to 'test_files/scratch/copy/table.arrow' STORED AS ARROW;----2@@ -517,7 +517,7 @@ select * from validate_arrow_file;2 Bar# Copy from dict encoded values to single arrow file-query T?+query ICOPY (values('c', arrow_cast('foo', 'Dictionary(Int32, Utf8)')), ('d', arrow_cast('bar', 'Dictionary(Int32, Utf8)')))to 'test_files/scratch/copy/table_dict.arrow' STORED AS ARROW;@@ -538,7 +538,7 @@ d bar# Copy from table to folder of json-query IT+query ICOPY source_table to 'test_files/scratch/copy/table_arrow' STORED AS ARROW;----2@@ -556,7 +556,7 @@ select * from validate_arrow;# Format Options Support without the 'format.' prefix# Copy with format options for Parquet without the 'format.' prefix-query IT+query ICOPY source_table TO 'test_files/scratch/copy/format_table.parquet'OPTIONS (compression snappy,@@ -566,14 +566,14 @@ OPTIONS (2# Copy with format options for JSON without the 'format.' prefix-query IT+query ICOPY source_table to 'test_files/scratch/copy/format_table'STORED AS JSON OPTIONS (compression gzip);----2# Copy with format options for CSV without the 'format.' prefix-query IT+query ICOPY source_table to 'test_files/scratch/copy/format_table.csv'OPTIONS (has_header false,diff --git a/datafusion/sqllogictest/test_files/csv_files.slt b/datafusion/sqllogictest/test_files/csv_files.sltindex f7f5aa54dd..3fb9a6f20c 100644--- a/datafusion/sqllogictest/test_files/csv_files.slt+++ b/datafusion/sqllogictest/test_files/csv_files.slt@@ -115,14 +115,14 @@ CREATE TABLE src_table_2 ((7, 'ggg', 700, 2),(8, 'hhh', 800, 2);-query ITII+query ICOPY src_table_1 TO 'test_files/scratch/csv_files/csv_partitions/1.csv'STORED AS CSV;----4-query ITII+query ICOPY src_table_2 TO 'test_files/scratch/csv_files/csv_partitions/2.csv'STORED AS CSV;----@@ -175,7 +175,7 @@ CREATE TABLE table_with_necessary_quoting ((4, 'h|h|h');# quote is required because `|` is delimiter and part of the data-query IT+query ICOPY table_with_necessary_quoting TO 'test_files/scratch/csv_files/table_with_necessary_quoting.csv'STORED AS csvOPTIONS ('format.quote' '~',@@ -247,7 +247,7 @@ id2 "value2"id3 "value3"# ensure that double quote option is used when writing to csv-query TT+query ICOPY csv_with_double_quote TO 'test_files/scratch/csv_files/table_with_double_quotes.csv'STORED AS csvOPTIONS ('format.double_quote' 'true');@@ -271,7 +271,7 @@ id2 "value2"id3 "value3"# ensure when double quote option is disabled that quotes are escaped instead-query TT+query ICOPY csv_with_double_quote TO 'test_files/scratch/csv_files/table_with_escaped_quotes.csv'STORED AS csvOPTIONS ('format.double_quote' 'false', 'format.escape' '#');diff --git a/datafusion/sqllogictest/test_files/expr.slt b/datafusion/sqllogictest/test_files/expr.sltindex 1d5f9ba23d..3c3b0631e3 100644--- a/datafusion/sqllogictest/test_files/expr.slt+++ b/datafusion/sqllogictest/test_files/expr.slt@@ -22,7 +22,7 @@ SELECT true, false, false = false, true = falsetrue false true false# test_mathematical_expressions_with_null-query RRRRRRRRRRRRRRRRRR?RRRRRRRIRRRRRRBB+query RRRRRRRRRRRRRRRRRR?RRRRRIIIRRRRRRBBSELECTsqrt(NULL),cbrt(NULL),@@ -365,7 +365,7 @@ SELECT bit_length('josé')----40-query ?+query ISELECT bit_length(NULL)----NULL@@ -395,7 +395,7 @@ SELECT btrim('\nxyxtrimyyx\n', 'xyz\n')----trim-query ?+query TSELECT btrim(NULL, 'xyz')----NULL@@ -476,7 +476,7 @@ SELECT initcap('hi THOMAS')----Hi Thomas-query ?+query TSELECT initcap(NULL)----NULL@@ -491,7 +491,7 @@ SELECT lower('TOM')----tom-query ?+query TSELECT lower(NULL)----NULL@@ -511,7 +511,7 @@ SELECT ltrim('zzzytest', 'xyz')----test-query ?+query TSELECT ltrim(NULL, 'xyz')----NULL@@ -531,7 +531,7 @@ SELECT octet_length('josé')----5-query ?+query ISELECT octet_length(NULL)----NULL@@ -551,7 +551,7 @@ SELECT repeat('Pg', CAST(NULL AS INT))----NULL-query ?+query TSELECT repeat(NULL, 4)----NULL@@ -576,7 +576,7 @@ SELECT replace('abcdefabcdef', NULL, 'XX')----NULL-query ?+query TSELECT replace(NULL, 'cd', 'XX')----NULL@@ -596,7 +596,7 @@ SELECT rtrim('testxxzx', 'xyz')----test-query ?+query TSELECT rtrim(NULL, 'xyz')----NULL@@ -611,7 +611,7 @@ SELECT split_part('abc~@~def~@~ghi', '~@~', 20)----(empty)-query ?+query TSELECT split_part(NULL, '~@~', 20)----NULL@@ -788,7 +788,7 @@ SELECT upper('tom')----TOM-query ?+query TSELECT upper(NULL)----NULL@@ -1774,7 +1774,7 @@ SELECT arrow_cast(decode(arrow_cast('746f6d', 'LargeBinary'),'hex'), 'Utf8');----tom-query ?+query TSELECT encode(NULL,'base64');----NULL@@ -1784,7 +1784,7 @@ SELECT decode(NULL,'base64');----NULL-query ?+query TSELECT encode(NULL,'hex');----NULL@@ -1829,7 +1829,7 @@ SELECT md5('');----d41d8cd98f00b204e9800998ecf8427e-query ?+query TSELECT md5(NULL);----NULLdiff --git a/datafusion/sqllogictest/test_files/functions.slt b/datafusion/sqllogictest/test_files/functions.sltindex c3dd791f6c..3255ddccdb 100644--- a/datafusion/sqllogictest/test_files/functions.slt+++ b/datafusion/sqllogictest/test_files/functions.slt@@ -33,7 +33,7 @@ SELECT char_length('josé')----4-query ?+query ISELECT char_length(NULL)----NULL@@ -53,7 +53,7 @@ SELECT character_length('josé')----4-query ?+query ISELECT character_length(NULL)----NULL@@ -93,12 +93,12 @@ SELECT left('abcde', CAST(NULL AS INT))----NULL-query ?+query TSELECT left(NULL, 2)----NULL-query ?+query TSELECT left(NULL, CAST(NULL AS INT))----NULL@@ -128,7 +128,7 @@ SELECT length(arrow_cast('josé', 'Dictionary(Int32, Utf8)'))----4-query ?+query ISELECT length(NULL)----NULL@@ -193,12 +193,12 @@ SELECT lpad('xyxhi', 3)----xyx-query ?+query TSELECT lpad(NULL, 0)----NULL-query ?+query TSELECT lpad(NULL, 5, 'xy')----NULL@@ -218,7 +218,7 @@ SELECT reverse('loẅks')----sk̈wol-query ?+query TSELECT reverse(NULL)----NULL@@ -258,12 +258,12 @@ SELECT right('abcde', CAST(NULL AS INT))----NULL-query ?+query TSELECT right(NULL, 2)----NULL-query ?+query TSELECT right(NULL, CAST(NULL AS INT))----NULL@@ -348,7 +348,7 @@ SELECT strpos('joséésoj', 'abc')----0-query ?+query ISELECT strpos(NULL, 'abc')----NULL@@ -429,7 +429,7 @@ SELECT translate(arrow_cast('12345', 'Dictionary(Int32, Utf8)'), '143', 'ax')----a2x5-query ?+query TSELECT translate(NULL, '143', 'ax')----NULL@@ -923,12 +923,12 @@ SELECT levenshtein('kitten', NULL)----NULL-query ?+query ISELECT levenshtein(NULL, 'sitting')----NULL-query ?+query ISELECT levenshtein(NULL, NULL)----NULL@@ -1015,7 +1015,7 @@ arrow 1 arrowarrow 2 arrow# Test substring_index with NULL values-query ?TT?+query TTTTSELECTsubstring_index(NULL, '.', 1),substring_index('arrow.apache.org', NULL, 1),@@ -1094,7 +1094,7 @@ SELECT find_in_set('', '')----1-query ?+query ISELECT find_in_set(NULL, 'a,b,c,d')----NULL@@ -1105,7 +1105,7 @@ SELECT find_in_set('a', NULL)NULL-query ?+query ISELECT find_in_set(NULL, NULL)----NULLdiff --git a/datafusion/sqllogictest/test_files/group_by.slt b/datafusion/sqllogictest/test_files/group_by.sltindex a4a886c75a..5571315e2a 100644--- a/datafusion/sqllogictest/test_files/group_by.slt+++ b/datafusion/sqllogictest/test_files/group_by.slt@@ -4502,28 +4502,28 @@ CREATE TABLE src_table (('2020-12-19T00:00:00.00Z', 9);# Use src_table to create a partitioned file-query PI+query ICOPY (SELECT * FROM src_table)TO 'test_files/scratch/group_by/timestamp_table/0.csv'STORED AS CSV;----10-query PI+query ICOPY (SELECT * FROM src_table)TO 'test_files/scratch/group_by/timestamp_table/1.csv'STORED AS CSV;----10-query PI+query ICOPY (SELECT * FROM src_table)TO 'test_files/scratch/group_by/timestamp_table/2.csv'STORED AS CSV;----10-query PI+query ICOPY (SELECT * FROM src_table)TO 'test_files/scratch/group_by/timestamp_table/3.csv'STORED AS CSV;diff --git a/datafusion/sqllogictest/test_files/limit.slt b/datafusion/sqllogictest/test_files/limit.sltindex 4cdd40ac8c..439df7fede 100644--- a/datafusion/sqllogictest/test_files/limit.slt+++ b/datafusion/sqllogictest/test_files/limit.slt@@ -518,7 +518,7 @@ drop table aggregate_test_100;## Test limit pushdown in StreamingTableExec## Create sorted table with 5 rows-query IT+query ICOPY (select * from (values(1, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e'))) TO 'test_files/scratch/limit/data.csv' STORED AS CSV;diff --git a/datafusion/sqllogictest/test_files/nvl.slt b/datafusion/sqllogictest/test_files/nvl.sltindex c77214cc30..81e79e1eb5 100644--- a/datafusion/sqllogictest/test_files/nvl.slt+++ b/datafusion/sqllogictest/test_files/nvl.slt@@ -114,7 +114,7 @@ SELECT NVL(1, 3);----1-query ?+query ISELECT NVL(NULL, NULL);----NULLdiff --git a/datafusion/sqllogictest/test_files/parquet.slt b/datafusion/sqllogictest/test_files/parquet.sltindex 3342f85c81..a7ca0384d3 100644--- a/datafusion/sqllogictest/test_files/parquet.slt+++ b/datafusion/sqllogictest/test_files/parquet.slt@@ -42,7 +42,7 @@ CREATE TABLE src_table (# Setup 2 files, i.e., as many as there are partitions:# File 1:-query ITID+query ICOPY (SELECT * FROM src_table LIMIT 3)TO 'test_files/scratch/parquet/test_table/0.parquet'STORED AS PARQUET;@@ -50,7 +50,7 @@ STORED AS PARQUET;3# File 2:-query ITID+query ICOPY (SELECT * FROM src_table WHERE int_col > 3 LIMIT 3)TO 'test_files/scratch/parquet/test_table/1.parquet'STORED AS PARQUET;@@ -123,7 +123,7 @@ physical_plan02)--ParquetExec: file_groups={2 groups: [[WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch/parquet/test_table/0.parquet], [WORKSPACE_ROOT/datafusion/sqllogictest/test_files/scratch/parquet/test_table/1.parquet]]}, projection=[int_col, string_col], output_ordering=[string_col@1 ASC NULLS LAST, int_col@0 ASC NULLS LAST]# Add another file to the directory underlying test_table-query ITID+query ICOPY (SELECT * FROM src_table WHERE int_col > 6 LIMIT 3)TO 'test_files/scratch/parquet/test_table/2.parquet'STORED AS PARQUET;@@ -275,7 +275,7 @@ SELECT COUNT(*) FROM timestamp_with_tz;# Test config listing_table_ignore_subdirectory:-query ITID+query ICOPY (SELECT * FROM src_table WHERE int_col > 6 LIMIT 3)TO 'test_files/scratch/parquet/test_table/subdir/3.parquet'STORED AS PARQUET;diff --git a/datafusion/sqllogictest/test_files/parquet_sorted_statistics.slt b/datafusion/sqllogictest/test_files/parquet_sorted_statistics.sltindex f7a81f0845..b68d4f52d2 100644--- a/datafusion/sqllogictest/test_files/parquet_sorted_statistics.slt+++ b/datafusion/sqllogictest/test_files/parquet_sorted_statistics.slt@@ -56,7 +56,7 @@ CREATE TABLE src_table (# Setup 3 files, in particular more files than there are partitions# File 1:-query IITIDII+query ICOPY (SELECT * FROM src_table ORDER BY int_col LIMIT 3)TO 'test_files/scratch/parquet_sorted_statistics/test_table/partition_col=A/0.parquet'STORED AS PARQUET;@@ -64,7 +64,7 @@ STORED AS PARQUET;3# File 2:-query IITIDII+query ICOPY (SELECT * FROM src_table WHERE int_col > 3 ORDER BY int_col LIMIT 3)TO 'test_files/scratch/parquet_sorted_statistics/test_table/partition_col=B/1.parquet'STORED AS PARQUET;@@ -72,7 +72,7 @@ STORED AS PARQUET;3# Add another file to the directory underlying test_table-query IITIDII+query ICOPY (SELECT * FROM src_table WHERE int_col > 6 ORDER BY int_col LIMIT 3)TO 'test_files/scratch/parquet_sorted_statistics/test_table/partition_col=C/2.parquet'STORED AS PARQUET;diff --git a/datafusion/sqllogictest/test_files/regexp.slt b/datafusion/sqllogictest/test_files/regexp.sltindex aa99a54c26..149ad7f6fd 100644--- a/datafusion/sqllogictest/test_files/regexp.slt+++ b/datafusion/sqllogictest/test_files/regexp.slt@@ -94,7 +94,7 @@ SELECT regexp_like('aa', '.*-(\d)');----false-query ?+query BSELECT regexp_like(NULL, '.*-(\d)');----NULL@@ -104,7 +104,7 @@ SELECT regexp_like('aaa-0', NULL);----NULL-query ?+query BSELECT regexp_like(null, '.*-(\d)');----NULL@@ -294,7 +294,7 @@ SELECT regexp_replace('Thomas', '.[mN]a.', 'M');----ThM-query ?+query TSELECT regexp_replace(NULL, 'b(..)', 'X\\1Y', 'g');----NULLdiff --git a/datafusion/sqllogictest/test_files/scalar.slt b/datafusion/sqllogictest/test_files/scalar.sltindex 188a2c5863..6eed72e914 100644--- a/datafusion/sqllogictest/test_files/scalar.slt+++ b/datafusion/sqllogictest/test_files/scalar.slt@@ -706,7 +706,7 @@ select power(2, 0), power(2, 1), power(2, 2);1 2 4# power scalar nulls-query R rowsort+query I rowsortselect power(null, 64);----NULL@@ -718,7 +718,7 @@ select power(2, null);NULL# power scalar nulls #2-query R rowsort+query I rowsortselect power(null, null);----NULL@@ -1720,7 +1720,7 @@ CREATE TABLE test((-14, -14, -14.5, -14.5),(NULL, NULL, NULL, NULL);-query RRRRIR rowsort+query IRRRIR rowsortSELECT power(i32, exp_i) as power_i32,power(i64, exp_f) as power_i64,pow(f32, exp_i) as power_f32,@@ -1895,7 +1895,7 @@ select 100000 where position('legend' in 'league of legend') = 11;100000# test null-query ?+query Iselect position(null in null)----NULLdiff --git a/datafusion/sqllogictest/test_files/unnest.slt b/datafusion/sqllogictest/test_files/unnest.sltindex 4957011b8b..afa576d127 100644--- a/datafusion/sqllogictest/test_files/unnest.slt+++ b/datafusion/sqllogictest/test_files/unnest.slt@@ -235,7 +235,7 @@ NULL 10 NULLNULL NULL 17NULL NULL 18-query IIII+query IIITselectunnest(column1), unnest(column2) + 2,column3 * 10, unnest(array_remove(column1, '4'))