You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/06/18 18:52:46 UTC

[GitHub] [arrow] emkornfield commented on a change in pull request #6213: ARROW-7592: [C++] Fix crashes on corrupt IPC input

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



##########
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:
       Easier cross language support I believe




----------------------------------------------------------------
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:
users@infra.apache.org