[jira] [Commented] (IMPALA-13035) Querying metadata tables from non-Iceberg tables throws IllegalArgumentException

2024-05-04 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/IMPALA-13035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17843490#comment-17843490
 ] 

ASF subversion and git services commented on IMPALA-13035:
--

Commit f75745e9bbf289ffb9afe7baee882b5af4304d5b in impala's branch 
refs/heads/master from Daniel Becker
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=f75745e9b ]

IMPALA-13035: Querying metadata tables from non-Iceberg tables throws 
IllegalArgumentException

When attempting to query a metadata table of a non-Iceberg table the
analyzer throws 'IllegalArgumentException'.

The problem is that 'IcebergMetadataTable.isIcebergMetadataTable()'
doesn't actually check whether the given path belongs to a valid
metadata table, it only checks whether the path could syntactically
refer to one. This is because it is called in
'Path.getCandidateTables()', at which point analysis has not been done
yet.

However, 'IcebergMetadataTable.isIcebergMetadataTable()' is also called
in 'Analyzer.getTable()'. If 'isIcebergMetadataTable()' returns true,
'getTable()' tries to instantiate an 'IcebergMetadataTable' object with
the table ref of the base table. If that table is not an Iceberg table,
a precondition check fails.

This change renames 'isIcebergMetadataTable()' to
'canBeIcebergMetadataTable()' and adds a new 'isIcebergMetadataTable()'
function, which also takes an 'Analyzer' as a parameter. With the help
of the 'Analyzer' it is possible to determine whether the base table is
an Iceberg table. 'Analyzer.getTable()' then uses this new
'isIcebergMetadataTable()' function instead of
canBeIcebergMetadataTable().

The constructor of 'IcebergMetadataTable' is also modified to take an
'FeIcebergTable' as the parameter for the base table instead of a
general 'FeTable'.

Testing:
 - Added a test query in iceberg-metadata-tables.test.

Change-Id: Ia7c25ed85a8813011537c73f0aaf72db1501f9ef
Reviewed-on: http://gerrit.cloudera.org:8080/21361
Tested-by: Impala Public Jenkins 
Reviewed-by: Peter Rozsa 


> Querying metadata tables from non-Iceberg tables throws 
> IllegalArgumentException
> 
>
> Key: IMPALA-13035
> URL: https://issues.apache.org/jira/browse/IMPALA-13035
> Project: IMPALA
>  Issue Type: Bug
>Affects Versions: Impala 4.3.0
>Reporter: Peter Rozsa
>Assignee: Daniel Becker
>Priority: Minor
>  Labels: impala-iceberg
>
> If a query targets an Iceberg metadata table like default.xy.`files` and the 
> xy table is not an Iceberg table then the analyzer throws 
> IllegalArgumentException. 
> The main concern is that IcebergMetadataTable.java:isIcebergMetadataTable is 
> called before it's validated that the table is indeed an IcebergTable.
> Example: 
> {code:java}
> create table xy(a int);
> select * from default.xy.`files`;{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org



[jira] [Resolved] (IMPALA-13053) Update test_max_nesting_depth test to write Orc with Impala

2024-05-04 Thread Michael Smith (Jira)


 [ 
https://issues.apache.org/jira/browse/IMPALA-13053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Smith resolved IMPALA-13053.

Fix Version/s: Impala 4.5.0
   Resolution: Fixed

> Update test_max_nesting_depth test to write Orc with Impala
> ---
>
> Key: IMPALA-13053
> URL: https://issues.apache.org/jira/browse/IMPALA-13053
> Project: IMPALA
>  Issue Type: Task
>Reporter: Michael Smith
>Assignee: Michael Smith
>Priority: Major
> Fix For: Impala 4.5.0
>
>
> Update 
> tests/query_test/test_nested_types.py::TestMaxNestingDepth::test_max_nesting_depth
>  to write with Impala instead of Hive to reduce time spent writing test 
> files. Test setup through Hive currently takes 3 minutes.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org