rui-mo commented on code in PR #13041:
URL: https://github.com/apache/gluten/pull/13041#discussion_r4473071515
##########
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:
In this case, can we modify the parameter from `const velox::TypeKind&
typeKind` to `const TypePtr& type` to allow it handle logical types and aovid
introducting another API?
--
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]