This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 0b48152  ARROW-10262: [C++] Fix TypeClass for BinaryScalar and 
LargeBinaryScalar
0b48152 is described below

commit 0b481523b7502a984788d93b822a335894ffe648
Author: zanmato1984 <zanmato1...@gmail.com>
AuthorDate: Mon Oct 12 12:36:46 2020 +0200

    ARROW-10262: [C++] Fix TypeClass for BinaryScalar and LargeBinaryScalar
    
    Alias `TypeClass` in `BinaryScalar` and `LargeBinaryScalar` are seemingly 
typo-ed to be `BinaryScalar` and `LargeBinaryScalar`. This causes issues when 
using `ScalarType::TypeClass`, esp. with `TypeTrait` - i.e., compiler complains 
that there are no whatever members in specialized `TypeTrait<BinaryScalar>` and 
`TypeTrait<LargeBinaryScalar>`.
    
    Fixing them to `BinaryType` and `LargeBinaryType`.
    
    Closes #8423 from zanmato1984/arrow-10262
    
    Authored-by: zanmato1984 <zanmato1...@gmail.com>
    Signed-off-by: Antoine Pitrou <anto...@python.org>
---
 cpp/src/arrow/scalar.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpp/src/arrow/scalar.h b/cpp/src/arrow/scalar.h
index 946d3bf..da7114c 100644
--- a/cpp/src/arrow/scalar.h
+++ b/cpp/src/arrow/scalar.h
@@ -214,7 +214,7 @@ struct ARROW_EXPORT BaseBinaryScalar : public Scalar {
 
 struct ARROW_EXPORT BinaryScalar : public BaseBinaryScalar {
   using BaseBinaryScalar::BaseBinaryScalar;
-  using TypeClass = BinaryScalar;
+  using TypeClass = BinaryType;
 
   BinaryScalar(std::shared_ptr<Buffer> value, std::shared_ptr<DataType> type)
       : BaseBinaryScalar(std::move(value), std::move(type)) {}
@@ -239,7 +239,7 @@ struct ARROW_EXPORT StringScalar : public BinaryScalar {
 
 struct ARROW_EXPORT LargeBinaryScalar : public BaseBinaryScalar {
   using BaseBinaryScalar::BaseBinaryScalar;
-  using TypeClass = LargeBinaryScalar;
+  using TypeClass = LargeBinaryType;
 
   LargeBinaryScalar(std::shared_ptr<Buffer> value, std::shared_ptr<DataType> 
type)
       : BaseBinaryScalar(std::move(value), std::move(type)) {}

Reply via email to