alamb commented on code in PR #3534:
URL: https://github.com/apache/arrow-datafusion/pull/3534#discussion_r974654291


##########
datafusion/proto/src/from_proto.rs:
##########
@@ -218,20 +218,25 @@ impl From<protobuf::PrimitiveScalarType> for DataType {
             protobuf::PrimitiveScalarType::Float64 => DataType::Float64,
             protobuf::PrimitiveScalarType::Utf8 => DataType::Utf8,
             protobuf::PrimitiveScalarType::LargeUtf8 => DataType::LargeUtf8,
+            protobuf::PrimitiveScalarType::Binary => DataType::Binary,
+            protobuf::PrimitiveScalarType::LargeBinary => 
DataType::LargeBinary,
             protobuf::PrimitiveScalarType::Date32 => DataType::Date32,
-            protobuf::PrimitiveScalarType::TimeMicrosecond => {
-                DataType::Time64(TimeUnit::Microsecond)
-            }
-            protobuf::PrimitiveScalarType::TimeNanosecond => {
+            protobuf::PrimitiveScalarType::Time64 => {
                 DataType::Time64(TimeUnit::Nanosecond)
             }
+            protobuf::PrimitiveScalarType::TimestampMicrosecond => {

Review Comment:
   I changed the names of `PrimitiveScalarType` from `Time` here to `Timestamp` 
be consistent with the `ScalarValue` variants as well as the arrow type system



##########
datafusion/proto/src/from_proto.rs:
##########
@@ -643,15 +648,20 @@ impl TryFrom<&protobuf::PrimitiveScalarType> for 
ScalarValue {
             PrimitiveScalarType::Float64 => Self::Float64(None),
             PrimitiveScalarType::Utf8 => Self::Utf8(None),
             PrimitiveScalarType::LargeUtf8 => Self::LargeUtf8(None),
+            PrimitiveScalarType::Binary => Self::Binary(None),
+            PrimitiveScalarType::LargeBinary => Self::LargeBinary(None),
             PrimitiveScalarType::Date32 => Self::Date32(None),
-            PrimitiveScalarType::TimeMicrosecond => {
+            PrimitiveScalarType::Time64 => Self::Time64(None),
+            PrimitiveScalarType::TimestampMicrosecond => {
                 Self::TimestampMicrosecond(None, None)
             }
-            PrimitiveScalarType::TimeNanosecond => 
Self::TimestampNanosecond(None, None),
+            PrimitiveScalarType::TimestampNanosecond => {
+                Self::TimestampNanosecond(None, None)
+            }
             PrimitiveScalarType::Decimal128 => Self::Decimal128(None, 0, 0),
             PrimitiveScalarType::Date64 => Self::Date64(None),
-            PrimitiveScalarType::TimeSecond => Self::TimestampSecond(None, 
None),
-            PrimitiveScalarType::TimeMillisecond => {
+            PrimitiveScalarType::TimestampSecond => 
Self::TimestampSecond(None, None),

Review Comment:
   These were incorrectly previously set to be `Time` rather than `Timestamp`



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