alamb commented on code in PR #13797:
URL: https://github.com/apache/datafusion/pull/13797#discussion_r1887328176


##########
datafusion/common/src/scalar/mod.rs:
##########
@@ -5642,14 +5650,12 @@ mod tests {
             // null array
             Arc::new(NullArray::new(3)),
             // dense union
-            /* Dense union fails due to 
https://github.com/apache/datafusion/issues/13762
             {

Review Comment:
   🎉 



##########
datafusion/common/src/scalar/mod.rs:
##########
@@ -2453,15 +2453,23 @@ impl ScalarValue {
                             value.to_array_of_size(size)?
                         } else {
                             let dt = field.data_type();
-                            new_null_array(dt, size)
+                            match mode {
+                                UnionMode::Sparse => new_null_array(dt, size),
+                                // In a dense union, only the child with 
values needs to be

Review Comment:
   I double checked the spec and I agree with this check: 
https://arrow.apache.org/docs/format/Columnar.html#dense-union



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