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



##########
File path: cpp/src/arrow/type.cc
##########
@@ -501,20 +501,35 @@ Status Decimal128Type::Make(int32_t precision, int32_t 
scale,
 // ----------------------------------------------------------------------
 // Dictionary-encoded type
 
+Status DictionaryType::ValidateParameters(const DataType& index_type,
+                                          const DataType& value_type) {
+  const bool index_type_ok = is_integer(index_type.id()) &&
+                             checked_cast<const 
IntegerType&>(index_type).is_signed();
+  if (!index_type_ok) {
+    return Status::TypeError("Dictionary index type should be signed integer, 
got ",

Review comment:
       Yes that was the thinking. 




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