You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Wenzhe Zhou (Code Review)" <ge...@cloudera.org> on 2021/11/19 04:40:38 UTC

[Impala-ASF-CR] IMPALA-11029: DescriptorTable.copyTupleDescriptor throw exception for Kudu table

Wenzhe Zhou has uploaded a new patch set (#2). ( http://gerrit.cloudera.org:8080/18037 )

Change subject: IMPALA-11029: DescriptorTable.copyTupleDescriptor throw exception for Kudu table
......................................................................

IMPALA-11029: DescriptorTable.copyTupleDescriptor throw exception for Kudu table

In DescriptorTable.copyTupleDescriptor(), a TupleDescriptor object is
created with slots copied from source TupleDescriptor, but its "path"
member variable is set as null. This make the table associated with the
copied TupleDescriptor object detected as non Kudu table, and
SlotDescriptor.isKuduStringSlot() always returns false for its copied
slots.
TupleDescriptor.getSlotSize() add 4 padding bytes for Kudu string slot.
When this function is called to calculate slot size for string type
slots for copied TupleDescriptor object, the slot size will be 4 bytes
less than the slot size calculated for the source TupleDescriptor if the
table associated with source TupleDescriptor is Kudu table. This cause
Preconditions.checkState(d.getByteSize() == src.getByteSize()) failed to
throw exception.
To fix it, we should copy "path" from source TupleDescriptor for the
copied TupleDescriptor object before coping slots.

Testing:
 - Added a new test case to verify the bug fixing.
 - Passed exhaustive tests.

Change-Id: Ib88e005910134f2b7575c06fa02ce11890418a41
---
M fe/src/main/java/org/apache/impala/analysis/DescriptorTable.java
M tests/query_test/test_kudu.py
2 files changed, 51 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/37/18037/2
-- 
To view, visit http://gerrit.cloudera.org:8080/18037
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ib88e005910134f2b7575c06fa02ce11890418a41
Gerrit-Change-Number: 18037
Gerrit-PatchSet: 2
Gerrit-Owner: Wenzhe Zhou <wz...@cloudera.com>
Gerrit-Reviewer: Aman Sinha <am...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>