Jefffrey commented on code in PR #24266:
URL: https://github.com/apache/datafusion/pull/24266#discussion_r3809490933


##########
datafusion/sqllogictest/test_files/spark/string/to_binary.slt:
##########
@@ -23,5 +23,108 @@
 
 ## Original Query: SELECT to_binary('abc', 'utf-8');
 ## PySpark 3.5.5 Result: {'to_binary(abc, utf-8)': bytearray(b'abc'), 
'typeof(to_binary(abc, utf-8))': 'binary', 'typeof(abc)': 'string', 
'typeof(utf-8)': 'string'}
-#query
-#SELECT to_binary('abc'::string, 'utf-8'::string);
+query ?
+SELECT to_binary('abc'::string, 'utf-8'::string);
+----
+616263
+
+# the format is matched case-insensitively, and utf8 is an accepted spelling
+query ?
+SELECT to_binary('abc'::string, 'UTF8'::string);
+----
+616263
+
+query ?
+SELECT to_binary('abc'::string, 'utf8'::string);
+----
+616263
+
+# a multi-byte character round-trips as its utf-8 bytes

Review Comment:
   ```suggestion
   # multi-byte character test
   ```
   
   nit: theres no roundtripping happening



-- 
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