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/25 22:01:21 UTC

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

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



##########
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:
       cc @trxcllnt who claimed that other Arrow implementations (I presume JS) didn't enforce signed types for the indices




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