Skip to content

Commit

Permalink
Add scalar test case
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Liu <[email protected]>
  • Loading branch information
austin362667 committed Nov 1, 2024
1 parent 290af45 commit a168548
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
17 changes: 17 additions & 0 deletions datafusion/sqllogictest/test_files/string/string_query.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -1096,3 +1096,20 @@ 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
NULL NULL NULL NULL NULL NULL

# TODO: Support Utf8View for bit_length array string function
# --------------------------------------
# Test BIT_LENGTH
# --------------------------------------
# query II
# SELECT
# BIT_LENGTH(ascii_1),
# BIT_LENGTH(unicode_1)
# FROM test_basic_operator;
# ----
# 48 144
# 72 176
# 56 240
# 88 104
# 56 216
# NULL NULL
10 changes: 10 additions & 0 deletions datafusion/sqllogictest/test_files/string/string_view.slt
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ select octet_length(column1_utf8view) from test;
7
NULL

query IIII
SELECT
BIT_LENGTH(arrow_cast('Andrew', 'Utf8View')),
BIT_LENGTH(arrow_cast('datafusion数据融合', 'Utf8View')),
BIT_LENGTH(arrow_cast('💖', 'Utf8View')),
BIT_LENGTH(arrow_cast('josé', 'Utf8View'))
;
----
48 176 32 40

query error DataFusion error: Arrow error: Compute error: bit_length not supported for Utf8View
select bit_length(column1_utf8view) from test;

Expand Down

0 comments on commit a168548

Please sign in to comment.