[jira] [Commented] (IMPALA-13035) Querying metadata tables from non-Iceberg tables throws IllegalArgumentException
[ https://issues.apache.org/jira/browse/IMPALA-13035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17873310#comment-17873310 ] ASF subversion and git services commented on IMPALA-13035: -- Commit 65ee0ffeaa6d283fcb952d36104f5400e45786ce in impala's branch refs/heads/branch-4.4.1 from Daniel Becker [ https://gitbox.apache.org/repos/asf?p=impala.git;h=65ee0ffea ] 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 > Fix For: Impala 4.5.0 > > > 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] [Commented] (IMPALA-13035) Querying metadata tables from non-Iceberg tables throws IllegalArgumentException
[ https://issues.apache.org/jira/browse/IMPALA-13035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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