Zoltan Borok-Nagy has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24524


Change subject: IMPALA-15126: Fix NullPointerException for STRUCT.* expansion 
on masked tables
......................................................................

IMPALA-15126: Fix NullPointerException for STRUCT.* expansion on masked tables

When a table has a column-masking policy, queries are rewritten to read from
a table-masking view and re-analyzed. Expanding a struct that contains a
nested collection - via STRUCT.* or SELECT * with EXPAND_COMPLEX_TYPES=true -
built the collection's relative path with Path.createRelPath(), which did not
carry the path's table-masking marker. The collection was therefore rooted at
the underlying table's tuple, which is registered only inside the masking
view's analyzer, so CollectionTableRef.analyze() -> Analyzer.findAnalyzer()
returned null and threw a NullPointerException.

Path.createRelPath() now propagates the pre-masking path to the derived
relative path, so a collection reached through struct expansion roots at the
masking view's tuple in the current query block (matching how directly
selected masked collections already resolve).

Testing:
- New FE test
  AuthorizationStmtTest.testColumnMaskingStructWithNestedCollection
- New e2e test cases in
  QueryTest/ranger_column_masking_complex_types.test

Change-Id: Id101542aed900220383481f17d812b1889f78736
Assisted-by: Claude Opus 4.8 (1M context) <[email protected]>
---
M fe/src/main/java/org/apache/impala/analysis/Path.java
M fe/src/test/java/org/apache/impala/authorization/AuthorizationStmtTest.java
M 
testdata/workloads/functional-query/queries/QueryTest/ranger_column_masking_complex_types.test
3 files changed, 80 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/24/24524/1
--
To view, visit http://gerrit.cloudera.org:8080/24524
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Id101542aed900220383481f17d812b1889f78736
Gerrit-Change-Number: 24524
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>

Reply via email to