goldmedal commented on code in PR #13221:
URL: https://github.com/apache/datafusion/pull/13221#discussion_r1828563378


##########
datafusion/sqllogictest/test_files/string/string_view.slt:
##########
@@ -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

Review Comment:
   I think we can add a TODO comment here and file an issue to track 
https://github.com/apache/arrow-rs/pull/6671. After upgrading to the 
corresponding arrow-rs version, we should address the TODO comment in 
`string/string_query.slt.part#L1100`.



##########
datafusion/sqllogictest/test_files/string/string_query.slt.part:
##########
@@ -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

Review Comment:
   To cover other string types, we can add this test to each string testing 
file before https://github.com/apache/arrow-rs/pull/6671. 



##########
datafusion/sqllogictest/test_files/string/string_view.slt:
##########
@@ -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

Review Comment:
   I think we can move this test to `string/string_literal.slt` and then add 
similar tests for other string types as well (UTF8, LargeUTF8, and 
DictionaryString).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to