Skip to content

Commit a168548

Browse files
committed
Add scalar test case
Signed-off-by: Austin Liu <[email protected]>
1 parent 290af45 commit a168548

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

datafusion/sqllogictest/test_files/string/string_query.slt.part

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,3 +1096,20 @@ Rapha Raphael NULL datafusionДатаФус datafusionДатаФусион NULL
10961096
und under_score NULL un iść core un iść core NULL
10971097
p percent NULL pan Tadeusz ma iść w kąt pan Tadeusz ma iść w kąt NULL
10981098
NULL NULL NULL NULL NULL NULL
1099+
1100+
# TODO: Support Utf8View for bit_length array string function
1101+
# --------------------------------------
1102+
# Test BIT_LENGTH
1103+
# --------------------------------------
1104+
# query II
1105+
# SELECT
1106+
# BIT_LENGTH(ascii_1),
1107+
# BIT_LENGTH(unicode_1)
1108+
# FROM test_basic_operator;
1109+
# ----
1110+
# 48 144
1111+
# 72 176
1112+
# 56 240
1113+
# 88 104
1114+
# 56 216
1115+
# NULL NULL

datafusion/sqllogictest/test_files/string/string_view.slt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ select octet_length(column1_utf8view) from test;
9191
7
9292
NULL
9393

94+
query IIII
95+
SELECT
96+
BIT_LENGTH(arrow_cast('Andrew', 'Utf8View')),
97+
BIT_LENGTH(arrow_cast('datafusion数据融合', 'Utf8View')),
98+
BIT_LENGTH(arrow_cast('💖', 'Utf8View')),
99+
BIT_LENGTH(arrow_cast('josé', 'Utf8View'))
100+
;
101+
----
102+
48 176 32 40
103+
94104
query error DataFusion error: Arrow error: Compute error: bit_length not supported for Utf8View
95105
select bit_length(column1_utf8view) from test;
96106

0 commit comments

Comments
 (0)