You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Abhishek Rawat (Code Review)" <ge...@cloudera.org> on 2019/04/24 18:36:13 UTC

[Impala-ASF-CR] IMPALA-1856: MetadataOp.getTypeInfo() does not return all supported types.

Abhishek Rawat has uploaded a new patch set (#3). ( http://gerrit.cloudera.org:8080/13094 )

Change subject: IMPALA-1856: MetadataOp.getTypeInfo() does not return all supported types.
......................................................................

IMPALA-1856: MetadataOp.getTypeInfo() does not return all supported types.

The MetadataOp.getTypeInfo() is missing all the complex types
(ARRAY, MAP, and STRUCT). Several of the primitive data types such as
CHAR, VARCHAR, DECIMAL, DATE (newly added) are also not returned.

The Impala JDBC client should in theory call MetadataOp.getTypeInfo()
but that is not happening in the latest version of the driver. This
change will only ensure that on Impala side the
MetadataOp.getTypeInfo() returns correct results.

Updated MetadataOp::createGetTypeInfoResults to include all supported
and externally visible data types, including complex types (which were
missing along with some other Primitive types).

Added a new function ScalarType::isInternalType() to identify internal
types such as NULL_TYPE, FIXED_UDA_INTERMEDIATE which are not exposed
through getTypeInfo function or in any other manner through SQL.

Testing: There was a testing gap and ideally whenever a new type is
added or support for a type is changed the MetadataOp.getTypeInfo()
should return the correct result set representing the supported types.
- Updated FrontendTest.java to ensure that the result set from
  MetadataOp::getTypeInfo contains all supported and externally visible
  types
- Added new E2E test (test_get_type_info) in tests/hs2/test_hs2.py. The
  new test validates that the HS2 GetTypeInfo() RPC returns supported
  and externally visible types.

Change-Id: Icdccde7c32e52ed1b0c7b13a22171e8bcd7f1f2d
---
M fe/src/main/java/org/apache/impala/catalog/ScalarType.java
M fe/src/main/java/org/apache/impala/catalog/Type.java
M fe/src/main/java/org/apache/impala/service/MetadataOp.java
M fe/src/test/java/org/apache/impala/service/FrontendTest.java
M tests/hs2/test_hs2.py
5 files changed, 144 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/94/13094/3
-- 
To view, visit http://gerrit.cloudera.org:8080/13094
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Icdccde7c32e52ed1b0c7b13a22171e8bcd7f1f2d
Gerrit-Change-Number: 13094
Gerrit-PatchSet: 3
Gerrit-Owner: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Abhishek Rawat <ar...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>