westonpace commented on code in PR #40696:
URL: https://github.com/apache/arrow/pull/40696#discussion_r1535672154


##########
cpp/src/arrow/engine/substrait/extension_set.cc:
##########
@@ -1043,6 +1049,10 @@ struct DefaultExtensionIdRegistry : 
ExtensionIdRegistryImpl {
              TypeName{uint32(), "u32"},
              TypeName{uint64(), "u64"},
              TypeName{float16(), "fp16"},
+             TypeName{large_utf8(), "large_string"},
+             TypeName{large_binary(), "large_binary"},
+             TypeName{date64(), "date_millis"},
+             TypeName{time64(TimeUnit::NANO), "time_nanos"},

Review Comment:
   Well, I will eat my words.  Your suggestion worked.



##########
cpp/src/arrow/engine/substrait/expression_internal.cc:
##########
@@ -421,6 +427,65 @@ Result<compute::Expression> FromProto(const 
substrait::Expression& expr,
       expr.DebugString());
 }
 
+namespace {
+struct UserDefinedLiteralToArrow {
+  Status Visit(const DataType& type) {
+    return Status::NotImplemented("User defined literals of type ", type);
+  }
+  Status Visit(const IntegerType& type) {
+    google::protobuf::UInt64Value value;
+    if (!user_defined_->value().UnpackTo(&value)) {
+      return Status::Invalid("Failed to unpack user defined integer literal to 
uint64");
+    }
+    ARROW_ASSIGN_OR_RAISE(scalar_, MakeScalar(type.GetSharedPtr(), 
value.value()));
+    return Status::OK();
+  }
+  Status Visit(const Date64Type& type) {
+    google::protobuf::UInt64Value value;

Review Comment:
   Yes indeed.  Fixed.



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

Reply via email to