andygrove commented on code in PR #3018:
URL: https://github.com/apache/datafusion-comet/pull/3018#discussion_r2662775773


##########
native/spark-expr/src/json_funcs/to_json.rs:
##########
@@ -181,6 +188,23 @@ fn escape_string(input: &str) -> String {
     escaped_string
 }
 
+fn normalize_special_floats(arr: &StringArray) -> ArrayRef {
+    let mut builder = StringBuilder::with_capacity(arr.len(), arr.len() * 8);
+
+    for i in 0..arr.len() {
+        if arr.is_null(i) {
+            builder.append_null();
+        } else {
+            match arr.value(i) {
+                "Infinity" | "-Infinity" | "NaN" => builder.append_null(),

Review Comment:
   I checked out this branch locally and then merged the changes from 
https://github.com/apache/datafusion-comet/pull/3011 and saw different results 
from Spark and Comet for infinity:
   
   ```
   Spark: [{"c0":false, ... "c5":"-Infinity", ...}]
   Comet: [{"c0":false, ... "c5":-Infinity, ...}]
   ```
   
   Let's get the unit tests merged first and then pull them into this PR.



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