wesm commented on a change in pull request #7461:
URL: https://github.com/apache/arrow/pull/7461#discussion_r441604605



##########
File path: cpp/src/arrow/scalar.h
##########
@@ -237,19 +246,17 @@ struct ARROW_EXPORT FixedSizeBinaryScalar : public 
BinaryScalar {
   explicit FixedSizeBinaryScalar(std::shared_ptr<DataType> type) : 
BinaryScalar(type) {}
 };
 
-template <typename T>
-struct ARROW_EXPORT TemporalScalar : public Scalar {
-  using Scalar::Scalar;
+template <typename T, typename StorageType = typename T::StorageType,
+          typename Enable = void>
+struct ARROW_EXPORT TemporalScalar : internal::PrimitiveScalar<StorageType> {

Review comment:
       Int64Scalar and TimestampScalar need to have a common base type in order 
to both be unboxed by templated code that uses Int64Type in the kernel codegen. 
So `PrimitiveScalar<TimestampType>` won't work. 




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to