Apache DataFusion SQL Query Engine
Allow testing records with sibling whitespace in SLT tests and add more string tests (#13197)
Piotr Findeisen5e53b631dc26
diff --git a/datafusion/sqllogictest/bin/sqllogictests.rs b/datafusion/sqllogictest/bin/sqllogictests.rsindex 2479252a7b..c3e739d146 100644--- a/datafusion/sqllogictest/bin/sqllogictests.rs+++ b/datafusion/sqllogictest/bin/sqllogictests.rs@@ -22,6 +22,7 @@ use std::path::{Path, PathBuf};use clap::Parser;use datafusion_sqllogictest::{DataFusion, TestContext};use futures::stream::StreamExt;+use itertools::Itertools;use log::info;use sqllogictest::strict_column_validator;@@ -39,6 +40,23 @@ pub fn main() -> Result<()> {.block_on(run_tests())}+fn value_validator(actual: &[Vec<String>], expected: &[String]) -> bool {+ let expected = expected+ .iter()+ // Trailing whitespace from lines in SLT will typically be removed, but do not fail if it is not+ // If particular test wants to cover trailing whitespace on a value,+ // it should project additional non-whitespace column on the right.+ .map(|s| s.trim_end().to_owned())+ .collect::<Vec<_>>();+ let actual = actual+ .iter()+ .map(|strs| strs.iter().join(" "))+ // Editors do not preserve trailing whitespace, so expected may or may not lack it included+ .map(|s| s.trim_end().to_owned())+ .collect::<Vec<_>>();+ actual == expected+}+/// Sets up an empty directory at test_files/scratch/<name>/// creating it if needed and clearing any file contents if it exists/// This allows tests for inserting to external tables or copy to@@ -140,6 +158,7 @@ async fn run_test_file(test_file: TestFile) -> Result<()> {))});runner.with_column_validator(strict_column_validator);+ runner.with_validator(value_validator);runner.run_file_async(path).await@@ -158,6 +177,7 @@ async fn run_test_file_with_postgres(test_file: TestFile) -> Result<()> {let mut runner =sqllogictest::Runner::new(|| Postgres::connect(relative_path.clone()));runner.with_column_validator(strict_column_validator);+ runner.with_validator(value_validator);runner.run_file_async(path).await@@ -176,7 +196,6 @@ async fn run_complete_file(test_file: TestFile) -> Result<()> {path,relative_path,} = test_file;- use sqllogictest::default_validator;info!("Using complete mode to complete: {}", path.display());@@ -196,7 +215,7 @@ async fn run_complete_file(test_file: TestFile) -> Result<()> {.update_test_file(path,col_separator,- default_validator,+ value_validator,strict_column_validator,).awaitdiff --git a/datafusion/sqllogictest/test_files/avro.slt b/datafusion/sqllogictest/test_files/avro.sltindex f8ef81a8ba..8282331f99 100644--- a/datafusion/sqllogictest/test_files/avro.slt+++ b/datafusion/sqllogictest/test_files/avro.slt@@ -198,22 +198,22 @@ NULLquery ITSELECT id, CAST(string_col AS varchar) FROM alltypes_plain_multi_files-----4 0-5 1-6 0-7 1-2 0-3 1-0 0-1 1-4 0-5 1-6 0-7 1-2 0-3 1-0 0-1 1+4 0+5 1+6 0+7 1+2 0+3 1+0 0+1 1+4 0+5 1+6 0+7 1+2 0+3 1+0 0+1 1# test avro nested recordsquery ????diff --git a/datafusion/sqllogictest/test_files/map.slt b/datafusion/sqllogictest/test_files/map.sltindex ed4f999aa1..10ca3ae881 100644--- a/datafusion/sqllogictest/test_files/map.slt+++ b/datafusion/sqllogictest/test_files/map.slt@@ -433,7 +433,7 @@ SELECT MAP {'a': 1, null: 2}query ?SELECT MAP {[1,2,3]:1, [2,4]:2};----- {[1, 2, 3]: 1, [2, 4]: 2}+{[1, 2, 3]: 1, [2, 4]: 2}# array with different type as key# expect to fail due to type coercion error@@ -483,7 +483,7 @@ SELECT MAP { MAP {1:'a', 2:'b'}:1, MAP {1:'c', 2:'d'}:2 };query ?SELECT MAP { MAP {1:'a', 2:'b', 3:'c'}:1, MAP {2:'c', 4:'d'}:2 };----- {{1: a, 2: b, 3: c}: 1, {2: c, 4: d}: 2}+{{1: a, 2: b, 3: c}: 1, {2: c, 4: d}: 2}# map as valuequery ?diff --git a/datafusion/sqllogictest/test_files/pg_compat/pg_compat_types.slt b/datafusion/sqllogictest/test_files/pg_compat/pg_compat_types.sltindex b7497429fa..7e315a448b 100644--- a/datafusion/sqllogictest/test_files/pg_compat/pg_compat_types.slt+++ b/datafusion/sqllogictest/test_files/pg_compat/pg_compat_types.slt@@ -24,18 +24,18 @@ NULLquery TTselect 'a'::VARCHAR, ''::VARCHAR-----a (empty)+a (empty)skipif postgresquery TTselect 'a'::CHAR, ''::CHAR-----a (empty)+a (empty)query TTselect 'a'::TEXT, ''::TEXT-----a (empty)+a (empty)skipif postgresquery Idiff --git a/datafusion/sqllogictest/test_files/select.slt b/datafusion/sqllogictest/test_files/select.sltindex f2ab4135aa..d7ff51011b 100644--- a/datafusion/sqllogictest/test_files/select.slt+++ b/datafusion/sqllogictest/test_files/select.slt@@ -459,7 +459,7 @@ VALUES (-1)query IIBVALUES (2+1,2-1,2>1)-----3 1 true+3 1 true# multiple rows valuesquery I rowsort@@ -472,8 +472,8 @@ VALUES (1),(2)query IT rowsortVALUES (1,'a'),(2,'b')-----1 a-2 b+1 a+2 b# table foo for distinct order bystatement okdiff --git a/datafusion/sqllogictest/test_files/string/dictionary_utf8.slt b/datafusion/sqllogictest/test_files/string/dictionary_utf8.sltindex 8a2916f669..c43f3a4cc1 100644--- a/datafusion/sqllogictest/test_files/string/dictionary_utf8.slt+++ b/datafusion/sqllogictest/test_files/string/dictionary_utf8.slt@@ -58,6 +58,8 @@ Xiangpeng datafusion数据融合 false true false trueRaphael datafusionДатаФусион false false false falseunder_score un iść core false false false falsepercent pan Tadeusz ma iść w kąt false false false false+(empty) (empty) false false false false+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL#diff --git a/datafusion/sqllogictest/test_files/string/init_data.slt.part b/datafusion/sqllogictest/test_files/string/init_data.slt.partindex 18cd022f78..e3914ea498 100644--- a/datafusion/sqllogictest/test_files/string/init_data.slt.part+++ b/datafusion/sqllogictest/test_files/string/init_data.slt.part@@ -22,6 +22,8 @@ create table test_source as values('Raphael', 'R', 'datafusionДатаФусион', 'аФус'),('under_score', 'un_____core', 'un iść core', 'chrząszcz na łące w 東京都'),('percent', 'p%t', 'pan Tadeusz ma iść w kąt', 'Pan Tadeusz ma frunąć stąd w kąt'),+ ('', '%', '', ''),+ (NULL, '%', NULL, NULL),(NULL, 'R', NULL, '🔥');# --------------------------------------diff --git a/datafusion/sqllogictest/test_files/string/large_string.slt b/datafusion/sqllogictest/test_files/string/large_string.sltindex 2063eae0f8..1cf906d7dc 100644--- a/datafusion/sqllogictest/test_files/string/large_string.slt+++ b/datafusion/sqllogictest/test_files/string/large_string.slt@@ -43,6 +43,8 @@ Xiangpeng Xiangpeng datafusion数据融合 datafusion数据融合Raphael R datafusionДатаФусион аФусunder_score un_____core un iść core chrząszcz na łące w 東京都percent p%t pan Tadeusz ma iść w kąt Pan Tadeusz ma frunąć stąd w kąt+(empty) % (empty) (empty)+NULL % NULL NULLNULL R NULL 🔥# TODO: move it back to `string_query.slt.part` after fixing the issue@@ -61,6 +63,8 @@ Xiangpeng datafusion数据融合 false true false trueRaphael datafusionДатаФусион false false false falseunder_score un iść core false false false falsepercent pan Tadeusz ma iść w kąt false false false false+(empty) (empty) false false false false+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL#diff --git a/datafusion/sqllogictest/test_files/string/string.slt b/datafusion/sqllogictest/test_files/string/string.sltindex 62b0cae5f6..9e97712b68 100644--- a/datafusion/sqllogictest/test_files/string/string.slt+++ b/datafusion/sqllogictest/test_files/string/string.slt@@ -50,6 +50,8 @@ Xiangpeng datafusion数据融合 false true false trueRaphael datafusionДатаФусион false false false falseunder_score un iść core false false false falsepercent pan Tadeusz ma iść w kąt false false false false+(empty) (empty) false false false false+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL#@@ -72,6 +74,9 @@ SELECT unicode_2, 'is LIKE', ascii_2 FROM test_basic_operator WHERE unicode_2 LIUNION ALLSELECT unicode_2, 'is NOT LIKE', ascii_2 FROM test_basic_operator WHERE unicode_2 NOT LIKE ascii_2----+(empty) is LIKE %+(empty) is LIKE %+(empty) is LIKE %Andrew is NOT LIKE XPan Tadeusz ma frunąć stąd w kąt is NOT LIKE p%tRaphael is NOT LIKE R@@ -100,7 +105,9 @@ SELECT(unicode_2 LIKE ascii_2) AS unicode_2_like_ascii_2FROM test_basic_operator----+(empty) % (empty) (empty) true false true trueAndrew X datafusion📊🔥 🔥 false false false false+NULL % NULL NULL NULL NULL NULL NULLNULL R NULL 🔥 NULL NULL NULL falseRaphael R datafusionДатаФусион аФус false false false falseXiangpeng Xiangpeng datafusion数据融合 datafusion数据融合 true true false false@@ -122,6 +129,9 @@ SELECT unicode_2, 'is ILIKE', ascii_2 FROM test_basic_operator WHERE unicode_2 IUNION ALLSELECT unicode_2, 'is NOT ILIKE', ascii_2 FROM test_basic_operator WHERE unicode_2 NOT ILIKE ascii_2----+(empty) is ILIKE %+(empty) is ILIKE %+(empty) is ILIKE %Andrew is NOT ILIKE XPan Tadeusz ma frunąć stąd w kąt is ILIKE p%tRaphael is NOT ILIKE R@@ -150,7 +160,9 @@ SELECT(unicode_2 ILIKE ascii_2) AS unicode_2_ilike_ascii_2FROM test_basic_operator----+(empty) % (empty) (empty) true false true trueAndrew X datafusion📊🔥 🔥 false false false false+NULL % NULL NULL NULL NULL NULL NULLNULL R NULL 🔥 NULL NULL NULL falseRaphael R datafusionДатаФусион аФус false false false falseXiangpeng Xiangpeng datafusion数据融合 datafusion数据融合 true true false falsediff --git a/datafusion/sqllogictest/test_files/string/string_literal.slt b/datafusion/sqllogictest/test_files/string/string_literal.sltindex 5d84774769..80bd7fc59c 100644--- a/datafusion/sqllogictest/test_files/string/string_literal.slt+++ b/datafusion/sqllogictest/test_files/string/string_literal.slt@@ -816,3 +816,8 @@ query BSELECT starts_with('foobar', 'bar')----false++query TT+select ' ', '|'+----+ |diff --git a/datafusion/sqllogictest/test_files/string/string_query.slt.part b/datafusion/sqllogictest/test_files/string/string_query.slt.partindex 24ac379ca5..c4975b5b8c 100644--- a/datafusion/sqllogictest/test_files/string/string_query.slt.part+++ b/datafusion/sqllogictest/test_files/string/string_query.slt.part@@ -28,6 +28,8 @@ Xiangpeng Xiangpeng datafusion数据融合 datafusion数据融合Raphael R datafusionДатаФусион аФусunder_score un_____core un iść core chrząszcz na łące w 東京都percent p%t pan Tadeusz ma iść w kąt Pan Tadeusz ma frunąć stąd w kąt+(empty) % (empty) (empty)+NULL % NULL NULLNULL R NULL 🔥# --------------------------------------@@ -46,11 +48,13 @@ Andrew XRaphael Runder_score un_____corepercent p%t+(empty) %query TTselect unicode_1, unicode_2 from test_basic_operator where unicode_1 = unicode_2----datafusion数据融合 datafusion数据融合+(empty) (empty)query TTselect unicode_1, unicode_2 from test_basic_operator where unicode_1 <> unicode_2@@ -63,6 +67,7 @@ pan Tadeusz ma iść w kąt Pan Tadeusz ma frunąć stąd w kątquery TTselect ascii_1, unicode_1 from test_basic_operator where ascii_1 = unicode_1----+(empty) (empty)query TTselect ascii_1, unicode_1 from test_basic_operator where ascii_1 <> unicode_1@@ -92,6 +97,8 @@ Xiangpeng Xiangpeng datafusion数据融合 datafusion数据融合 true false truRaphael R datafusionДатаФусион аФус false true false true false trueunder_score un_____core un iść core chrząszcz na łące w 東京都 false true false true false truepercent p%t pan Tadeusz ma iść w kąt Pan Tadeusz ma frunąć stąd w kąt false true false true false true+(empty) % (empty) (empty) false true true false true false+NULL % NULL NULL NULL NULL NULL NULL NULL NULLNULL R NULL 🔥 NULL NULL NULL NULL NULL NULL# --------------------------------------@@ -111,6 +118,8 @@ Xiangpeng datafusion数据融合 false true true falseRaphael datafusionДатаФусион false true false trueunder_score un iść core false true false truepercent pan Tadeusz ma iść w kąt false true false true+(empty) (empty) false true false true+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -130,6 +139,8 @@ Xiangpeng datafusion数据融合 false true true falseRaphael datafusionДатаФусион false true false trueunder_score un iść core false true false truepercent pan Tadeusz ma iść w kąt false true false true+(empty) (empty) false true false true+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -149,6 +160,8 @@ Xiangpeng datafusion数据融合 false true true falseRaphael datafusionДатаФусион false true false trueunder_score un iść core false true false truepercent pan Tadeusz ma iść w kąt false true false true+(empty) (empty) false true false true+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -193,6 +206,8 @@ Xia Xia dat datRap R dat аФуund un_ un chrper p%t pan Pan+(empty) % (empty) (empty)+NULL % NULL NULLNULL R NULL 🔥# --------------------------------------@@ -205,7 +220,7 @@ SELECTFROMtest_basic_operator-----5 5+6 6query IISELECT@@ -220,8 +235,9 @@ GROUP BY ascii_2;1 11 11 1+1 1-query II+query II rowsortSELECTCOUNT(DISTINCT ascii_1),COUNT(DISTINCT unicode_1)@@ -229,6 +245,8 @@ FROMtest_basic_operatorGROUP BY unicode_2;----+0 0+1 11 11 11 1@@ -252,6 +270,8 @@ true true false falsetrue false false falsefalse false false falsefalse false false false+false true true false+NULL NULL NULL NULLNULL NULL NULL NULLquery BBBB@@ -267,6 +287,8 @@ false false true truefalse false true falsefalse false false falsefalse false false false+false false false false+NULL false NULL NULLNULL false NULL false# --------------------------------------@@ -283,6 +305,8 @@ XiangpengRaphaelunder_scrrepercent+(empty)+NULLNULLquery T@@ -295,6 +319,8 @@ databusirn数据融合databusirnДатаФусионun iść crrepan Tadeusz ma iść w kąt+(empty)+NULLNULL# --------------------------------------@@ -312,6 +338,8 @@ XiangpfngRaphaflundfr_scorepfrcent+(empty)+NULLNULL# Should run REGEXP_REPLACE with Scalar value for string with flag@@ -325,6 +353,8 @@ XiangpfngRaphaflundfr_scorepfrcent+(empty)+NULLNULL# Should run REGEXP_REPLACE with ScalarArray value for string@@ -338,6 +368,8 @@ XiangpengRaphaelbarbar+bar+NULLNULL# Should run REGEXP_REPLACE with ScalarArray value for string with flag@@ -351,6 +383,8 @@ XiangpengRaphaelbarbar+bar+NULLNULL# --------------------------------------@@ -373,6 +407,8 @@ Xiangpeng Datafusion数据融合Raphael DatafusionдатафусионUnder_Score Un Iść CorePercent Pan Tadeusz Ma Iść W KąT+(empty) (empty)+NULL NULLNULL NULLstatement ok@@ -395,6 +431,8 @@ FROM test_basic_operator;82 82 100 1072117 117 117 99112 112 112 80+0 37 0 0+NULL 37 NULL NULLNULL 82 NULL 128293# --------------------------------------@@ -417,6 +455,8 @@ Xiangpeng Xiangpeng NULL datafusion数据融合 datafusion数据融合 NULLRaphael Raphael NULL datafusionДатаФусион datafusionДатаФусион NULLunder_score under_score NULL un iść core un iść core NULLpercent percent NULL pan Tadeusz ma iść w kąt pan Tadeusz ma iść w kąt NULL+(empty) (empty) NULL (empty) (empty) NULL+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -439,6 +479,8 @@ Xiangpeng (empty) NULL datafusion数据融合 NULL datafusion数据融合Raphael aphael NULL datafusionДатаФусион NULL datafusionДатаФусионunder_score der_score NULL un iść core NULL un iść corepercent ercent NULL pan Tadeusz ma iść w kąt NULL pan Tadeusz ma iść w kąt+(empty) (empty) NULL (empty) NULL (empty)+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -460,6 +502,8 @@ Xiangpeng (empty) Xiangpeng NULL datafusion数据融合Raphael Raphael Raphael NULL datafusionДатаФусионunder_sco under_s under_score NULL un iść corepercent percen percent NULL pan Tadeusz ma iść w kąt+(empty) (empty) (empty) NULL (empty)+NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL# --------------------------------------@@ -481,6 +525,8 @@ false true NULL true NULL falsefalse true NULL true NULL falsefalse false NULL false NULL falsefalse false NULL false NULL false+false false NULL true NULL false+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -495,6 +541,8 @@ xiangpeng datafusion数据融合raphael datafusionдатафусионunder_score un iść corepercent pan tadeusz ma iść w kąt+(empty) (empty)+NULL NULLNULL NULL# --------------------------------------@@ -509,6 +557,8 @@ XIANGPENG DATAFUSION数据融合RAPHAEL DATAFUSIONДАТАФУСИОНUNDER_SCORE UN IŚĆ COREPERCENT PAN TADEUSZ MA IŚĆ W KĄT+(empty) (empty)+NULL NULLNULL NULL# --------------------------------------@@ -536,6 +586,8 @@ Xiangpeng:Data XiangpengXiangpeng Xiangpeng Xiangpengdatafusion数据融合 XianRaphael:Data RaphaelR Raphael RaphaeldatafusionДатаФусион RaphaelаФус datafusionДатаФусионRaphael datafusionДатаФусионаФус datafusionДатаФусион datafusionДатаФусион🔥 🔥 (empty) Raphael,datafusionДатаФусионunder_score:Data under_scoreun_____core under_score under_scoreun iść core under_scorechrząszcz na łące w 東京都 un iść coreunder_score un iść corechrząszcz na łące w 東京都 un iść core un iść core🔥 🔥 (empty) under_score,un iść corepercent:Data percentp%t percent percentpan Tadeusz ma iść w kąt percentPan Tadeusz ma frunąć stąd w kąt pan Tadeusz ma iść w kątpercent pan Tadeusz ma iść w kątPan Tadeusz ma frunąć stąd w kąt pan Tadeusz ma iść w kąt pan Tadeusz ma iść w kąt🔥 🔥 (empty) percent,pan Tadeusz ma iść w kąt+:Data % (empty) (empty) (empty) (empty) (empty) (empty) 🔥 🔥 (empty) ,+:Data % (empty) (empty) (empty) (empty) (empty) (empty) 🔥 🔥 (empty) ,:Data R (empty) (empty) 🔥 (empty) 🔥 (empty) 🔥 🔥 (empty) ,# --------------------------------------@@ -557,6 +609,8 @@ Xfoogpeng dfoofusion数据融合 X🔥angpeng d🔥tafusion数据融合 NULL NULRfooael dfoofusionДатаФусион R🔥phael d🔥tafusionДатаФусион NULL NULLufoor_score ufoość core u🔥der_score u🔥 iść core NULL NULLpfooent pfooTadeusz ma iść w kąt p🔥rcent p🔥n Tadeusz ma iść w kąt NULL NULL+foo foo 🔥 🔥 NULL NULL+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -578,6 +632,8 @@ Xiangpeng bar NULL bar NULL datafusion数据融合Raphael baraphael NULL datafusionДатbarион NULL datafusionДатаФусионunder_score under_score NULL un iść core NULL un iść corepercent percent NULL pan Tadeusz ma iść w kąt NULL pan Tadeusz ma iść w kąt+(empty) (empty) NULL bar NULL (empty)+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -599,6 +655,8 @@ eng (empty) ngpeng 据融合 (empty) afusion数据融合ael (empty) hael ион (empty) afusionДатаФусионore (empty) er_score ore (empty) iść coreent (empty) cent kąt (empty) Tadeusz ma iść w kąt+(empty) (empty) (empty) (empty) (empty) (empty)+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -621,6 +679,8 @@ Xia (empty) Xiangp dat (empty) datafusion数Rap (empty) Raph dat (empty) datafusionДатаФусund (empty) under_sc un (empty) un iść cper (empty) perc pan (empty) pan Tadeusz ma iść w+(empty) (empty) (empty) (empty) (empty) (empty)+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -640,6 +700,8 @@ Xi Xiangpeng datafusion数据融合 datafusion数据融合R Raph datafusionД datafusionДатunder_score under_score un iść core un iść corepercent percent pan Tadeusz ma iść w kąt pan Tadeusz ma iść w kąt+(empty) (empty) (empty) (empty)+NULL NULL NULL NULLNULL NULL NULL NULL# --------------------------------------@@ -659,6 +721,8 @@ FROM test_basic_operator;0 3 0 30 0 0 00 0 0 0+0 0 0 0+NULL NULL NULL NULLNULL NULL NULL NULL# --------------------------------------@@ -680,6 +744,8 @@ Xiangpengfoo Xiangpeng🔥 datafusion数据融合foo datafusion数据融合🔥Raphaelfoo Raphael🔥 datafusionДатаФусионfoo datafusionДатаФусион🔥under_scorefoo under_score🔥 un iść corefoo un iść core🔥percentfoo percent🔥 pan Tadeusz ma iść w kątfoo pan Tadeusz ma iść w kąt🔥+foo 🔥 foo 🔥+NULL NULL NULL NULLNULL NULL NULL NULL# || same type (column1 has null, so also tests NULL || NULL)@@ -697,6 +763,8 @@ XiangpengXiangpeng Xiangpengdatafusion数据融合 datafusion数据融合XiangpeRaphaelR RaphaelаФус datafusionДатаФусионR datafusionДатаФусионаФусunder_scoreun_____core under_scorechrząszcz na łące w 東京都 un iść coreun_____core un iść corechrząszcz na łące w 東京都percentp%t percentPan Tadeusz ma frunąć stąd w kąt pan Tadeusz ma iść w kątp%t pan Tadeusz ma iść w kątPan Tadeusz ma frunąć stąd w kąt+% (empty) % (empty)+NULL NULL NULL NULLNULL NULL NULL NULL# --------------------------------------@@ -714,6 +782,8 @@ true falsefalse truefalse falsefalse false+false false+NULL NULLNULL NULLquery BB@@ -727,6 +797,8 @@ false falsefalse truefalse falsefalse false+false false+NULL NULLNULL NULLquery BB@@ -740,6 +812,8 @@ true falsetrue truetrue truetrue true+true true+NULL NULLNULL NULLquery BB@@ -753,6 +827,8 @@ false falsetrue truetrue truetrue true+true true+NULL NULLNULL NULL# --------------------------------------@@ -773,6 +849,8 @@ Xiangpeng nice Xiangpeng and Xiangpeng datafusion数据融合 cool datafusion数Raphael nice Raphael and R datafusionДатаФусион cool datafusionДатаФусион and аФус Raphael 🔥 datafusionДатаФусионunder_score nice under_score and un_____core un iść core cool un iść core and chrząszcz na łące w 東京都 under_score 🔥 un iść corepercent nice percent and p%t pan Tadeusz ma iść w kąt cool pan Tadeusz ma iść w kąt and Pan Tadeusz ma frunąć stąd w kąt percent 🔥 pan Tadeusz ma iść w kąt+ nice and % cool and 🔥+NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL# --------------------------------------@@ -809,6 +887,8 @@ Xiangpeng datafusion数据融合 false false false falseRaphael datafusionДатаФусион false false false falseunder_score un iść core false false false falsepercent pan Tadeusz ma iść w kąt false false false false+(empty) (empty) false false false false+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -827,6 +907,8 @@ FROM7 2011 117 24+0 0+NULL NULLNULL NULL# --------------------------------------@@ -846,6 +928,8 @@ false true NULL NULLfalse true NULL NULLfalse false NULL NULLfalse false NULL NULL+false false NULL NULL+NULL NULL NULL NULLNULL NULL NULL NULL# --------------------------------------@@ -865,6 +949,8 @@ false false NULL NULLfalse true NULL NULLfalse false NULL NULLfalse false NULL NULL+false false NULL NULL+NULL NULL NULL NULLNULL NULL NULL NULL# --------------------------------------@@ -884,6 +970,8 @@ FROM test_basic_operator;6 10 NULL NULL8 13 NULL NULL6 19 NULL NULL+6 14 NULL NULL+NULL NULL NULL NULLNULL NULL NULL NULL# --------------------------------------@@ -903,20 +991,25 @@ xxxxxxxxxxxXiangpeng NULL 🔥🔥🔥🔥🔥🔥datafusion数据融合 NULLxxxxxxxxxxxxxRaphael NULL datafusionДатаФусион NULLxxxxxxxxxunder_score NULL 🔥🔥🔥🔥🔥🔥🔥🔥🔥un iść core NULLxxxxxxxxxxxxxpercent NULL pan Tadeusz ma iść w NULL+xxxxxxxxxxxxxxxxxxxx NULL 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 NULL+NULL NULL NULL NULLNULL NULL NULL NULL-query TT+query TTTSELECTLPAD(ascii_1, 20),- LPAD(unicode_1, 20)+ LPAD(unicode_1, 20),+ '|'FROM test_basic_operator;----- Andrew datafusion📊🔥- Xiangpeng datafusion数据融合- Raphael datafusionДатаФусион- under_score un iść core- percent pan Tadeusz ma iść w-NULL NULL+ Andrew datafusion📊🔥 |+ Xiangpeng datafusion数据融合 |+ Raphael datafusionДатаФусион |+ under_score un iść core |+ percent pan Tadeusz ma iść w |+ |+NULL NULL |+NULL NULL |# --------------------------------------# Test RPAD@@ -935,6 +1028,8 @@ Xiangpengxxxxxxxxxxx NULL datafusion数据融合🔥🔥🔥🔥🔥🔥 NULLRaphaelxxxxxxxxxxxxx NULL datafusionДатаФусион NULLunder_scorexxxxxxxxx NULL un iść core🔥🔥🔥🔥🔥🔥🔥🔥🔥 NULLpercentxxxxxxxxxxxxx NULL pan Tadeusz ma iść w NULL+xxxxxxxxxxxxxxxxxxxx NULL 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 NULL+NULL NULL NULL NULLNULL NULL NULL NULLquery TT@@ -948,6 +1043,8 @@ Xiangpeng datafusion数据融合Raphael datafusionДатаФусионunder_score un iść corepercent pan Tadeusz ma iść w++NULL NULLNULL NULL# --------------------------------------@@ -973,6 +1070,8 @@ true false NULL NULL true false NULL NULLfalse true NULL NULL false true NULL NULLfalse false NULL NULL false false NULL NULLfalse false NULL NULL false false NULL NULL+false false NULL NULL false false NULL NULL+NULL NULL NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL NULL NULL# --------------------------------------@@ -999,6 +1098,8 @@ NULL NULL NULL NULL NULL [таФ] NULL NULLNULL NULL NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL NULL NULL+NULL NULL NULL NULL NULL NULL NULL NULL+NULL NULL NULL NULL NULL NULL NULL NULL# --------------------------------------# Test REPEAT@@ -1015,6 +1116,8 @@ XiangpengXiangpengXiangpeng datafusion数据融合datafusion数据融合datafusiRaphaelRaphaelRaphael datafusionДатаФусионdatafusionДатаФусионdatafusionДатаФусионunder_scoreunder_scoreunder_score un iść coreun iść coreun iść corepercentpercentpercent pan Tadeusz ma iść w kątpan Tadeusz ma iść w kątpan Tadeusz ma iść w kąt+(empty) (empty)+NULL NULLNULL NULL# --------------------------------------@@ -1036,6 +1139,8 @@ Xiangp ng NULL datafusion数据融合 (empty) NULLRapha l NULL datafusionДатаФус он NULLund r_scor NULL un iść core (empty) NULLp rc NULL pan Tadeusz ma iść w kąt (empty) NULL+(empty) (empty) NULL (empty) (empty) NULL+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -1053,6 +1158,8 @@ gnepgnaiX 合融据数noisufatadleahpaR ноисуФатаДnoisufataderocs_rednu eroc ćśi nutnecrep tąk w ćśi am zsuedaT nap+(empty) (empty)+NULL NULLNULL NULL# --------------------------------------@@ -1074,6 +1181,8 @@ FROM test_basic_operator;6 0 NULL 18 18 NULL4 0 NULL 0 0 NULL2 0 NULL 0 0 NULL+0 0 NULL 0 0 NULL+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULL# --------------------------------------@@ -1095,4 +1204,6 @@ Xiangp Xi NULL datafusion数据融合 datafusion数 NULLRapha Raphael NULL datafusionДатаФус datafusionДатаФусион NULLund under_score NULL un iść core un iść core NULLp percent NULL pan Tadeusz ma iść w kąt pan Tadeusz ma iść w kąt NULL+(empty) (empty) NULL (empty) (empty) NULL+NULL NULL NULL NULL NULL NULLNULL NULL NULL NULL NULL NULLdiff --git a/datafusion/sqllogictest/test_files/string/string_view.slt b/datafusion/sqllogictest/test_files/string/string_view.sltindex 997dca7191..43b08cb25f 100644--- a/datafusion/sqllogictest/test_files/string/string_view.slt+++ b/datafusion/sqllogictest/test_files/string/string_view.slt@@ -60,6 +60,7 @@ create table test_source as values('Andrew', 'X'),('Xiangpeng', 'Xiangpeng'),('Raphael', 'R'),+ ('', 'Warsaw'),(NULL, 'R');# Table with the different combination of column types@@ -89,6 +90,7 @@ select octet_length(column1_utf8view) from test;697+0NULLquery error DataFusion error: Arrow error: Compute error: bit_length not supported for Utf8View@@ -100,6 +102,7 @@ select btrim(column1_large_utf8) from test;AndrewXiangpengRaphael+(empty)NULL########@@ -119,6 +122,7 @@ from test;Andrew X false false true trueXiangpeng Xiangpeng true true false falseRaphael R false false true true+(empty) Warsaw false false true trueNULL R NULL NULL NULL NULL# test StringViewArray with LargeUtf8 columns@@ -134,6 +138,7 @@ from test;Andrew X false false true trueXiangpeng Xiangpeng true true false falseRaphael R false false true true+(empty) Warsaw false false true trueNULL R NULL NULL NULL NULL########@@ -153,6 +158,7 @@ from test;Andrew X false false true trueXiangpeng Xiangpeng true true false falseRaphael R false false true true+(empty) Warsaw false false true trueNULL R NULL NULL NULL NULL# StringView column to Dict scalar@@ -168,6 +174,7 @@ from test;Andrew X true true false falseXiangpeng Xiangpeng false false true trueRaphael R false false true true+(empty) Warsaw false false true trueNULL R NULL NULL NULL NULL# Dict column to StringView scalar@@ -183,6 +190,7 @@ from test;Andrew X true true false falseXiangpeng Xiangpeng false false true trueRaphael R false false true true+(empty) Warsaw false false true trueNULL R NULL NULL NULL NULL########@@ -296,6 +304,7 @@ FROM test;false false falsetrue true truetrue true true+false false falseNULL NULL NULL# Test STARTS_WITH with utf8 against utf8view, utf8, and largeutf8@@ -322,6 +331,7 @@ FROM test;false false falsetrue true truetrue true true+false false falseNULL NULL NULL@@ -702,6 +712,7 @@ FROM test;AndrewXXiangpengXiangpengRaphaelR+WarsawR## Should run CONCAT successfully with utf8 utf8view and largeutf8@@ -713,6 +724,7 @@ FROM test;AndrewXXXiangpengXiangpengXiangpengRaphaelRR+WarsawWarsawRR## Ensure no casts for REGEXP_LIKEdiff --git a/datafusion/sqllogictest/test_files/window.slt b/datafusion/sqllogictest/test_files/window.sltindex 4a2d9e1d68..29ff62ab34 100644--- a/datafusion/sqllogictest/test_files/window.slt+++ b/datafusion/sqllogictest/test_files/window.slt@@ -3679,14 +3679,14 @@ SELECTFROM score_board sORDER BY team_name, score;-----Mongrels Apu 350 1-Mongrels Ned 666 1-Mongrels Meg 1030 2-Mongrels Burns 1270 2-Simpsons Homer 1 1-Simpsons Lisa 710 1-Simpsons Marge 990 2-Simpsons Bart 2010 2+Mongrels Apu 350 1+Mongrels Ned 666 1+Mongrels Meg 1030 2+Mongrels Burns 1270 2+Simpsons Homer 1 1+Simpsons Lisa 710 1+Simpsons Marge 990 2+Simpsons Bart 2010 2query TTIISELECT@@ -3697,14 +3697,14 @@ SELECTFROM score_board sORDER BY score;-----Simpsons Homer 1 1-Mongrels Apu 350 1-Mongrels Ned 666 1-Simpsons Lisa 710 1-Simpsons Marge 990 2-Mongrels Meg 1030 2-Mongrels Burns 1270 2-Simpsons Bart 2010 2+Simpsons Homer 1 1+Mongrels Apu 350 1+Mongrels Ned 666 1+Simpsons Lisa 710 1+Simpsons Marge 990 2+Mongrels Meg 1030 2+Mongrels Burns 1270 2+Simpsons Bart 2010 2query TTIISELECT@@ -3715,14 +3715,14 @@ SELECTFROM score_board sORDER BY team_name, score;-----Mongrels Apu 350 1-Mongrels Ned 666 2-Mongrels Meg 1030 3-Mongrels Burns 1270 4-Simpsons Homer 1 1-Simpsons Lisa 710 2-Simpsons Marge 990 3-Simpsons Bart 2010 4+Mongrels Apu 350 1+Mongrels Ned 666 2+Mongrels Meg 1030 3+Mongrels Burns 1270 4+Simpsons Homer 1 1+Simpsons Lisa 710 2+Simpsons Marge 990 3+Simpsons Bart 2010 4query TTIISELECT@@ -3733,14 +3733,14 @@ SELECTFROM score_board sORDER BY team_name, score;-----Mongrels Apu 350 1-Mongrels Ned 666 1-Mongrels Meg 1030 1-Mongrels Burns 1270 1-Simpsons Homer 1 1-Simpsons Lisa 710 1-Simpsons Marge 990 1-Simpsons Bart 2010 1+Mongrels Apu 350 1+Mongrels Ned 666 1+Mongrels Meg 1030 1+Mongrels Burns 1270 1+Simpsons Homer 1 1+Simpsons Lisa 710 1+Simpsons Marge 990 1+Simpsons Bart 2010 1# incorrect number of parameters for ntilequery error DataFusion error: Execution error: NTILE requires a positive integer, but finds NULL@@ -4849,10 +4849,10 @@ SELECTnth_value(column2, arrow_cast(2, 'Int32')) OVER (order by column1)FROM t;-----3 1 1 4 4 NULL NULL NULL NULL-4 1 1 5 5 3 3 4 4-5 2 2 6 6 4 4 4 4-6 2 2 NULL NULL 5 5 4 4+3 1 1 4 4 NULL NULL NULL NULL+4 1 1 5 5 3 3 4 4+5 2 2 6 6 4 4 4 4+6 2 2 NULL NULL 5 5 4 4# NTILE specifies the argument types so the error is differentquery error