felipepessoto commented on code in PR #13041:
URL: https://github.com/apache/gluten/pull/13041#discussion_r4473667247


##########
cpp/velox/substrait/VeloxToSubstraitExpr.cc:
##########
@@ -99,9 +99,45 @@ const ::substrait::Expression_Literal& 
toSubstraitNullLiteral(
   return *substraitField;
 }
 
+const ::substrait::Expression_Literal& toSubstraitNullLiteral(
+    google::protobuf::Arena& arena,
+    const velox::TypePtr& type) {
+  auto nestedType = type;
+  while (nestedType->isArray()) {
+    nestedType = nestedType->asArray().elementType();
+  }
+  // Preserve physical-kind encoding for non-timestamp nulls.
+  if (nestedType->kind() != TypeKind::TIMESTAMP) {
+    return toSubstraitNullLiteral(arena, type->kind());
+  }
+  ::substrait::Expression_Literal* substraitField =

Review Comment:
   Updated in `3ba32b365`. The existing helper now takes `const velox::TypePtr& 
type`, and I removed the extra overload. Timestamp and timestamp-array nulls 
retain their logical types, while the existing non-timestamp null encodings 
remain unchanged.



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