Description
"row__id" is a synthetic column that only exists in full ACID tables. If there are Ranger column-masking/row-filtering policies applied on the table, it can't be resolved in many cases.
For instance, creating a column-masking policy on table functional_orc_def.alltypestiny that mask column "id" to "id * 100". The following queries would fail:
select id, row__id.* from functional_orc_def.alltypestiny; ERROR: AnalysisException: Could not resolve star expression: 'row__id.*' select id, row__id.rowid from functional_orc_def.alltypestiny; ERROR: AnalysisException: Could not resolve column/field reference: 'row__id.rowid'
Note that it still works in some cases, e.g.
select row__id.* from functional_orc_def.alltypestiny; +-----------+---------------------+-----------+-------+--------------------+ | operation | originaltransaction | bucket | rowid | currenttransaction | +-----------+---------------------+-----------+-------+--------------------+ | 0 | 5 | 536870912 | 0 | 5 | | 0 | 5 | 536870912 | 1 | 5 | | 0 | 5 | 536870912 | 0 | 5 | | 0 | 5 | 536870912 | 1 | 5 | | 0 | 5 | 536870912 | 0 | 5 | | 0 | 5 | 536870912 | 1 | 5 | | 0 | 5 | 536870912 | 0 | 5 | | 0 | 5 | 536870912 | 1 | 5 | +-----------+---------------------+-----------+-------+--------------------+
The failed cases are all using the "row__id" column with normal columns together.
CC boroknagyz, fangyurao