This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 5e53b631dc Allow testing records with sibling whitespace in SLT tests
and add more string tests (#13197)
5e53b631dc is described below
commit 5e53b631dc2654a3c63ad80783745ca255ecfc94
Author: Piotr Findeisen <[email protected]>
AuthorDate: Fri Nov 1 17:23:28 2024 +0100
Allow testing records with sibling whitespace in SLT tests and add more
string tests (#13197)
* empty
* Allow testing values with trailing whitespace in SLT tests
* Update SLT tests for "Allow testing values with trailing whitespace ..."
* Add empty string to string test data
---
datafusion/sqllogictest/bin/sqllogictests.rs | 23 +++-
datafusion/sqllogictest/test_files/avro.slt | 32 ++---
datafusion/sqllogictest/test_files/map.slt | 4 +-
.../test_files/pg_compat/pg_compat_types.slt | 6 +-
datafusion/sqllogictest/test_files/select.slt | 6 +-
.../test_files/string/dictionary_utf8.slt | 2 +
.../test_files/string/init_data.slt.part | 2 +
.../test_files/string/large_string.slt | 4 +
.../sqllogictest/test_files/string/string.slt | 12 ++
.../test_files/string/string_literal.slt | 5 +
.../test_files/string/string_query.slt.part | 131 +++++++++++++++++++--
.../sqllogictest/test_files/string/string_view.slt | 12 ++
datafusion/sqllogictest/test_files/window.slt | 72 +++++------
13 files changed, 239 insertions(+), 72 deletions(-)
diff --git a/datafusion/sqllogictest/bin/sqllogictests.rs
b/datafusion/sqllogictest/bin/sqllogictests.rs
index 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,
)
.await
diff --git a/datafusion/sqllogictest/test_files/avro.slt
b/datafusion/sqllogictest/test_files/avro.slt
index f8ef81a8ba..8282331f99 100644
--- a/datafusion/sqllogictest/test_files/avro.slt
+++ b/datafusion/sqllogictest/test_files/avro.slt
@@ -198,22 +198,22 @@ NULL
query IT
SELECT 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 records
query ????
diff --git a/datafusion/sqllogictest/test_files/map.slt
b/datafusion/sqllogictest/test_files/map.slt
index 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 value
query ?
diff --git a/datafusion/sqllogictest/test_files/pg_compat/pg_compat_types.slt
b/datafusion/sqllogictest/test_files/pg_compat/pg_compat_types.slt
index 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 @@ NULL
query TT
select 'a'::VARCHAR, ''::VARCHAR
----
-a (empty)
+a (empty)
skipif postgres
query TT
select 'a'::CHAR, ''::CHAR
----
-a (empty)
+a (empty)
query TT
select 'a'::TEXT, ''::TEXT
----
-a (empty)
+a (empty)
skipif postgres
query I
diff --git a/datafusion/sqllogictest/test_files/select.slt
b/datafusion/sqllogictest/test_files/select.slt
index f2ab4135aa..d7ff51011b 100644
--- a/datafusion/sqllogictest/test_files/select.slt
+++ b/datafusion/sqllogictest/test_files/select.slt
@@ -459,7 +459,7 @@ VALUES (-1)
query IIB
VALUES (2+1,2-1,2>1)
----
-3 1 true
+3 1 true
# multiple rows values
query I rowsort
@@ -472,8 +472,8 @@ VALUES (1),(2)
query IT rowsort
VALUES (1,'a'),(2,'b')
----
-1 a
-2 b
+1 a
+2 b
# table foo for distinct order by
statement ok
diff --git a/datafusion/sqllogictest/test_files/string/dictionary_utf8.slt
b/datafusion/sqllogictest/test_files/string/dictionary_utf8.slt
index 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 true
Raphael datafusionДатаФусион false false false false
under_score un iść core false false false false
percent pan Tadeusz ma iść w kąt false false false false
+(empty) (empty) false false false false
+NULL NULL NULL NULL NULL NULL
NULL 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.part
index 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.slt
index 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 NULL
NULL R NULL 🔥
# TODO: move it back to `string_query.slt.part` after fixing the issue
@@ -61,6 +63,8 @@ Xiangpeng datafusion数据融合 false true false true
Raphael datafusionДатаФусион false false false false
under_score un iść core false false false false
percent pan Tadeusz ma iść w kąt false false false false
+(empty) (empty) false false false false
+NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL
#
diff --git a/datafusion/sqllogictest/test_files/string/string.slt
b/datafusion/sqllogictest/test_files/string/string.slt
index 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 true
Raphael datafusionДатаФусион false false false false
under_score un iść core false false false false
percent pan Tadeusz ma iść w kąt false false false false
+(empty) (empty) false false false false
+NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL
#
@@ -72,6 +74,9 @@ SELECT unicode_2, 'is LIKE', ascii_2 FROM test_basic_operator
WHERE unicode_2 LI
UNION ALL
SELECT 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 X
Pan Tadeusz ma frunąć stąd w kąt is NOT LIKE p%t
Raphael is NOT LIKE R
@@ -100,7 +105,9 @@ SELECT
(unicode_2 LIKE ascii_2) AS unicode_2_like_ascii_2
FROM test_basic_operator
----
+(empty) % (empty) (empty) true false true true
Andrew X datafusion📊🔥 🔥 false false false false
+NULL % NULL NULL NULL NULL NULL NULL
NULL R NULL 🔥 NULL NULL NULL false
Raphael R datafusionДатаФусион аФус false false false false
Xiangpeng 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 I
UNION ALL
SELECT 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 X
Pan Tadeusz ma frunąć stąd w kąt is ILIKE p%t
Raphael is NOT ILIKE R
@@ -150,7 +160,9 @@ SELECT
(unicode_2 ILIKE ascii_2) AS unicode_2_ilike_ascii_2
FROM test_basic_operator
----
+(empty) % (empty) (empty) true false true true
Andrew X datafusion📊🔥 🔥 false false false false
+NULL % NULL NULL NULL NULL NULL NULL
NULL R NULL 🔥 NULL NULL NULL false
Raphael R datafusionДатаФусион аФус false false false false
Xiangpeng Xiangpeng datafusion数据融合 datafusion数据融合 true true false false
diff --git a/datafusion/sqllogictest/test_files/string/string_literal.slt
b/datafusion/sqllogictest/test_files/string/string_literal.slt
index 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 B
SELECT 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.part
index 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 NULL
NULL R NULL 🔥
# --------------------------------------
@@ -46,11 +48,13 @@ Andrew X
Raphael R
under_score un_____core
percent p%t
+(empty) %
query TT
select unicode_1, unicode_2 from test_basic_operator where unicode_1 =
unicode_2
----
datafusion数据融合 datafusion数据融合
+(empty) (empty)
query TT
select 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ąt
query TT
select ascii_1, unicode_1 from test_basic_operator where ascii_1 = unicode_1
----
+(empty) (empty)
query TT
select ascii_1, unicode_1 from test_basic_operator where ascii_1 <> unicode_1
@@ -92,6 +97,8 @@ Xiangpeng Xiangpeng datafusion数据融合 datafusion数据融合 true false
tru
Raphael R datafusionДатаФусион аФус false true false true false true
under_score un_____core un iść core chrząszcz na łące w 東京都 false true false
true false true
percent 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 NULL
NULL R NULL 🔥 NULL NULL NULL NULL NULL NULL
# --------------------------------------
@@ -111,6 +118,8 @@ Xiangpeng datafusion数据融合 false true true false
Raphael datafusionДатаФусион false true false true
under_score un iść core false true false true
percent pan Tadeusz ma iść w kąt false true false true
+(empty) (empty) false true false true
+NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL
# --------------------------------------
@@ -130,6 +139,8 @@ Xiangpeng datafusion数据融合 false true true false
Raphael datafusionДатаФусион false true false true
under_score un iść core false true false true
percent pan Tadeusz ma iść w kąt false true false true
+(empty) (empty) false true false true
+NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL
# --------------------------------------
@@ -149,6 +160,8 @@ Xiangpeng datafusion数据融合 false true true false
Raphael datafusionДатаФусион false true false true
under_score un iść core false true false true
percent pan Tadeusz ma iść w kąt false true false true
+(empty) (empty) false true false true
+NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL
# --------------------------------------
@@ -193,6 +206,8 @@ Xia Xia dat dat
Rap R dat аФу
und un_ un chr
per p%t pan Pan
+(empty) % (empty) (empty)
+NULL % NULL NULL
NULL R NULL 🔥
# --------------------------------------
@@ -205,7 +220,7 @@ SELECT
FROM
test_basic_operator
----
-5 5
+6 6
query II
SELECT
@@ -220,8 +235,9 @@ GROUP BY ascii_2;
1 1
1 1
1 1
+1 1
-query II
+query II rowsort
SELECT
COUNT(DISTINCT ascii_1),
COUNT(DISTINCT unicode_1)
@@ -229,6 +245,8 @@ FROM
test_basic_operator
GROUP BY unicode_2;
----
+0 0
+1 1
1 1
1 1
1 1
@@ -252,6 +270,8 @@ true true false false
true false false false
false false false false
false false false false
+false true true false
+NULL NULL NULL NULL
NULL NULL NULL NULL
query BBBB
@@ -267,6 +287,8 @@ false false true true
false false true false
false false false false
false false false false
+false false false false
+NULL false NULL NULL
NULL false NULL false
# --------------------------------------
@@ -283,6 +305,8 @@ Xiangpeng
Raphael
under_scrre
percent
+(empty)
+NULL
NULL
query T
@@ -295,6 +319,8 @@ databusirn数据融合
databusirnДатаФусион
un iść crre
pan Tadeusz ma iść w kąt
+(empty)
+NULL
NULL
# --------------------------------------
@@ -312,6 +338,8 @@ Xiangpfng
Raphafl
undfr_score
pfrcent
+(empty)
+NULL
NULL
# Should run REGEXP_REPLACE with Scalar value for string with flag
@@ -325,6 +353,8 @@ Xiangpfng
Raphafl
undfr_score
pfrcent
+(empty)
+NULL
NULL
# Should run REGEXP_REPLACE with ScalarArray value for string
@@ -338,6 +368,8 @@ Xiangpeng
Raphael
bar
bar
+bar
+NULL
NULL
# Should run REGEXP_REPLACE with ScalarArray value for string with flag
@@ -351,6 +383,8 @@ Xiangpeng
Raphael
bar
bar
+bar
+NULL
NULL
# --------------------------------------
@@ -373,6 +407,8 @@ Xiangpeng Datafusion数据融合
Raphael Datafusionдатафусион
Under_Score Un Iść Core
Percent Pan Tadeusz Ma Iść W KąT
+(empty) (empty)
+NULL NULL
NULL NULL
statement ok
@@ -395,6 +431,8 @@ FROM test_basic_operator;
82 82 100 1072
117 117 117 99
112 112 112 80
+0 37 0 0
+NULL 37 NULL NULL
NULL 82 NULL 128293
# --------------------------------------
@@ -417,6 +455,8 @@ Xiangpeng Xiangpeng NULL datafusion数据融合 datafusion数据融合 NULL
Raphael Raphael NULL datafusionДатаФусион datafusionДатаФусион NULL
under_score under_score NULL un iść core un iść core NULL
percent 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 NULL
NULL 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ść core
percent 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 NULL
NULL 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ść core
percent percen percent NULL pan Tadeusz ma iść w kąt
+(empty) (empty) (empty) NULL (empty)
+NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL
# --------------------------------------
@@ -481,6 +525,8 @@ false true NULL true NULL false
false true NULL true NULL false
false false NULL false NULL false
false false NULL false NULL false
+false false NULL true NULL false
+NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL
# --------------------------------------
@@ -495,6 +541,8 @@ xiangpeng datafusion数据融合
raphael datafusionдатафусион
under_score un iść core
percent pan tadeusz ma iść w kąt
+(empty) (empty)
+NULL NULL
NULL NULL
# --------------------------------------
@@ -509,6 +557,8 @@ XIANGPENG DATAFUSION数据融合
RAPHAEL DATAFUSIONДАТАФУСИОН
UNDER_SCORE UN IŚĆ CORE
PERCENT PAN TADEUSZ MA IŚĆ W KĄT
+(empty) (empty)
+NULL NULL
NULL NULL
# --------------------------------------
@@ -536,6 +586,8 @@ Xiangpeng:Data XiangpengXiangpeng Xiangpeng
Xiangpengdatafusion数据融合 Xian
Raphael: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ść core
percent: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 NUL
Rfooael dfoofusionДатаФусион R🔥phael d🔥tafusionДатаФусион NULL NULL
ufoor_score ufoość core u🔥der_score u🔥 iść core NULL NULL
pfooent 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 NULL
NULL 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ść core
percent 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 NULL
NULL 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ść core
ent (empty) cent kąt (empty) Tadeusz ma iść w kąt
+(empty) (empty) (empty) (empty) (empty) (empty)
+NULL NULL NULL NULL NULL NULL
NULL 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ść c
per (empty) perc pan (empty) pan Tadeusz ma iść w
+(empty) (empty) (empty) (empty) (empty) (empty)
+NULL NULL NULL NULL NULL NULL
NULL 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ść core
percent percent pan Tadeusz ma iść w kąt pan Tadeusz ma iść w kąt
+(empty) (empty) (empty) (empty)
+NULL NULL NULL NULL
NULL NULL NULL NULL
# --------------------------------------
@@ -659,6 +721,8 @@ FROM test_basic_operator;
0 3 0 3
0 0 0 0
0 0 0 0
+0 0 0 0
+NULL NULL NULL NULL
NULL 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 NULL
NULL NULL NULL NULL
# || same type (column1 has null, so also tests NULL || NULL)
@@ -697,6 +763,8 @@ XiangpengXiangpeng Xiangpengdatafusion数据融合
datafusion数据融合Xiangpe
RaphaelR 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 NULL
NULL NULL NULL NULL
# --------------------------------------
@@ -714,6 +782,8 @@ true false
false true
false false
false false
+false false
+NULL NULL
NULL NULL
query BB
@@ -727,6 +797,8 @@ false false
false true
false false
false false
+false false
+NULL NULL
NULL NULL
query BB
@@ -740,6 +812,8 @@ true false
true true
true true
true true
+true true
+NULL NULL
NULL NULL
query BB
@@ -753,6 +827,8 @@ false false
true true
true true
true true
+true true
+NULL NULL
NULL 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ść core
percent 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 NULL
NULL NULL NULL NULL NULL
# --------------------------------------
@@ -809,6 +887,8 @@ Xiangpeng datafusion数据融合 false false false false
Raphael datafusionДатаФусион false false false false
under_score un iść core false false false false
percent pan Tadeusz ma iść w kąt false false false false
+(empty) (empty) false false false false
+NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL
# --------------------------------------
@@ -827,6 +907,8 @@ FROM
7 20
11 11
7 24
+0 0
+NULL NULL
NULL NULL
# --------------------------------------
@@ -846,6 +928,8 @@ false true NULL NULL
false true NULL NULL
false false NULL NULL
false false NULL NULL
+false false NULL NULL
+NULL NULL NULL NULL
NULL NULL NULL NULL
# --------------------------------------
@@ -865,6 +949,8 @@ false false NULL NULL
false true NULL NULL
false false NULL NULL
false false NULL NULL
+false false NULL NULL
+NULL NULL NULL NULL
NULL NULL NULL NULL
# --------------------------------------
@@ -884,6 +970,8 @@ FROM test_basic_operator;
6 10 NULL NULL
8 13 NULL NULL
6 19 NULL NULL
+6 14 NULL NULL
+NULL NULL NULL NULL
NULL NULL NULL NULL
# --------------------------------------
@@ -903,20 +991,25 @@ xxxxxxxxxxxXiangpeng NULL 🔥🔥🔥🔥🔥🔥datafusion数据融合 NULL
xxxxxxxxxxxxxRaphael NULL datafusionДатаФусион NULL
xxxxxxxxxunder_score NULL 🔥🔥🔥🔥🔥🔥🔥🔥🔥un iść core NULL
xxxxxxxxxxxxxpercent NULL pan Tadeusz ma iść w NULL
+xxxxxxxxxxxxxxxxxxxx NULL 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 NULL
+NULL NULL NULL NULL
NULL NULL NULL NULL
-query TT
+query TTT
SELECT
LPAD(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数据融合🔥🔥🔥🔥🔥🔥 NULL
Raphaelxxxxxxxxxxxxx NULL datafusionДатаФусион NULL
under_scorexxxxxxxxx NULL un iść core🔥🔥🔥🔥🔥🔥🔥🔥🔥 NULL
percentxxxxxxxxxxxxx NULL pan Tadeusz ma iść w NULL
+xxxxxxxxxxxxxxxxxxxx NULL 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 NULL
+NULL NULL NULL NULL
NULL NULL NULL NULL
query TT
@@ -948,6 +1043,8 @@ Xiangpeng datafusion数据融合
Raphael datafusionДатаФусион
under_score un iść core
percent pan Tadeusz ma iść w
+
+NULL NULL
NULL NULL
# --------------------------------------
@@ -973,6 +1070,8 @@ true false NULL NULL true false NULL NULL
false true NULL NULL false true NULL NULL
false false NULL NULL false false NULL NULL
false false NULL NULL false false NULL NULL
+false false NULL NULL false false NULL NULL
+NULL NULL NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL NULL NULL
# --------------------------------------
@@ -999,6 +1098,8 @@ NULL NULL NULL NULL NULL [таФ] NULL NULL
NULL NULL NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL NULL NULL
NULL 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数据融合datafusi
RaphaelRaphaelRaphael
datafusionДатаФусионdatafusionДатаФусионdatafusionДатаФусион
under_scoreunder_scoreunder_score un iść coreun iść coreun iść core
percentpercentpercent pan Tadeusz ma iść w kątpan Tadeusz ma iść w kątpan
Tadeusz ma iść w kąt
+(empty) (empty)
+NULL NULL
NULL NULL
# --------------------------------------
@@ -1036,6 +1139,8 @@ Xiangp ng NULL datafusion数据融合 (empty) NULL
Rapha l NULL datafusionДатаФус он NULL
und r_scor NULL un iść core (empty) NULL
p rc NULL pan Tadeusz ma iść w kąt (empty) NULL
+(empty) (empty) NULL (empty) (empty) NULL
+NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL
# --------------------------------------
@@ -1053,6 +1158,8 @@ gnepgnaiX 合融据数noisufatad
leahpaR ноисуФатаДnoisufatad
erocs_rednu eroc ćśi nu
tnecrep tąk w ćśi am zsuedaT nap
+(empty) (empty)
+NULL NULL
NULL NULL
# --------------------------------------
@@ -1074,6 +1181,8 @@ FROM test_basic_operator;
6 0 NULL 18 18 NULL
4 0 NULL 0 0 NULL
2 0 NULL 0 0 NULL
+0 0 NULL 0 0 NULL
+NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL
# --------------------------------------
@@ -1095,4 +1204,6 @@ Xiangp Xi NULL datafusion数据融合 datafusion数 NULL
Rapha Raphael NULL datafusionДатаФус datafusionДатаФусион NULL
und under_score NULL un iść core un iść core NULL
p 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 NULL
NULL NULL NULL NULL NULL NULL
diff --git a/datafusion/sqllogictest/test_files/string/string_view.slt
b/datafusion/sqllogictest/test_files/string/string_view.slt
index 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;
6
9
7
+0
NULL
query error DataFusion error: Arrow error: Compute error: bit_length not
supported for Utf8View
@@ -100,6 +102,7 @@ select btrim(column1_large_utf8) from test;
Andrew
Xiangpeng
Raphael
+(empty)
NULL
########
@@ -119,6 +122,7 @@ from test;
Andrew X false false true true
Xiangpeng Xiangpeng true true false false
Raphael R false false true true
+(empty) Warsaw false false true true
NULL R NULL NULL NULL NULL
# test StringViewArray with LargeUtf8 columns
@@ -134,6 +138,7 @@ from test;
Andrew X false false true true
Xiangpeng Xiangpeng true true false false
Raphael R false false true true
+(empty) Warsaw false false true true
NULL R NULL NULL NULL NULL
########
@@ -153,6 +158,7 @@ from test;
Andrew X false false true true
Xiangpeng Xiangpeng true true false false
Raphael R false false true true
+(empty) Warsaw false false true true
NULL R NULL NULL NULL NULL
# StringView column to Dict scalar
@@ -168,6 +174,7 @@ from test;
Andrew X true true false false
Xiangpeng Xiangpeng false false true true
Raphael R false false true true
+(empty) Warsaw false false true true
NULL R NULL NULL NULL NULL
# Dict column to StringView scalar
@@ -183,6 +190,7 @@ from test;
Andrew X true true false false
Xiangpeng Xiangpeng false false true true
Raphael R false false true true
+(empty) Warsaw false false true true
NULL R NULL NULL NULL NULL
########
@@ -296,6 +304,7 @@ FROM test;
false false false
true true true
true true true
+false false false
NULL NULL NULL
# Test STARTS_WITH with utf8 against utf8view, utf8, and largeutf8
@@ -322,6 +331,7 @@ FROM test;
false false false
true true true
true true true
+false false false
NULL NULL NULL
@@ -702,6 +712,7 @@ FROM test;
AndrewX
XiangpengXiangpeng
RaphaelR
+Warsaw
R
## Should run CONCAT successfully with utf8 utf8view and largeutf8
@@ -713,6 +724,7 @@ FROM test;
AndrewXX
XiangpengXiangpengXiangpeng
RaphaelRR
+WarsawWarsaw
RR
## Ensure no casts for REGEXP_LIKE
diff --git a/datafusion/sqllogictest/test_files/window.slt
b/datafusion/sqllogictest/test_files/window.slt
index 4a2d9e1d68..29ff62ab34 100644
--- a/datafusion/sqllogictest/test_files/window.slt
+++ b/datafusion/sqllogictest/test_files/window.slt
@@ -3679,14 +3679,14 @@ SELECT
FROM score_board s
ORDER 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 2
query TTII
SELECT
@@ -3697,14 +3697,14 @@ SELECT
FROM score_board s
ORDER 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 2
query TTII
SELECT
@@ -3715,14 +3715,14 @@ SELECT
FROM score_board s
ORDER 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 4
query TTII
SELECT
@@ -3733,14 +3733,14 @@ SELECT
FROM score_board s
ORDER 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 ntile
query error DataFusion error: Execution error: NTILE requires a positive
integer, but finds NULL
@@ -4849,10 +4849,10 @@ SELECT
nth_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 different
query error
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]