[
https://issues.apache.org/jira/browse/IMPALA-12589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17795973#comment-17795973
]
ASF subversion and git services commented on IMPALA-12589:
----------------------------------------------------------
Commit 69aad8b5df52133bb349ca046ce6e13d2a0cf217 in impala's branch
refs/heads/master from Riza Suminto
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=69aad8b5d ]
IMPALA-12589: Ignore FbFileDesc.absolutePath() if it is null/empty
IMPALA-11507 add absolute_path field to FbFileDesc in
CatalogObjects.fbs. This field is used as a fallback for the
relative_path field when the relative path of an Iceberg data file
cannot be obtained by the table location path. relative_path is never
set with null, while absolute_path may not be set and left as null.
IMPALA-11507 missed a case where both FileDescriptor.getRelativePath()
and FbFileDesc.absolutePath() are null/empty. This patch fixes the bug
so that FileDescriptor.getPath() and FileDescriptor.getAbsolutePath() do
not fall back to FbFileDesc.absolutePath() if it is null/empty. With
this fix, FileDescriptor.getPath() and FileDescriptor.getAbsolutePath()
will not return null.
Testing:
- Add test_scanner.py::TestSingleFileTable
- Pass core tests
Change-Id: I15d811430871cd1319d9560901318c1c3b89403c
Reviewed-on: http://gerrit.cloudera.org:8080/20769
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> NPE on querying external tables pointing to a single file
> ---------------------------------------------------------
>
> Key: IMPALA-12589
> URL: https://issues.apache.org/jira/browse/IMPALA-12589
> Project: IMPALA
> Issue Type: Bug
> Components: fe
> Affects Versions: Impala 4.2.0, Impala 4.3.0
> Reporter: Peter Rozsa
> Assignee: Riza Suminto
> Priority: Major
>
> IMPALA-11507 brought in changes for relative/absolute paths, and made it
> impossible to query external tables pointing to a single file.
> HdfsPartition.getPath() returns null instead of empty path during
> computeEstimatedTableSize().
> Example:
> {code:java}
> create external table t1(c1 int) stored as textfile;
> insert into t1 values (1);
> show files in t1;
> <copy the file to a tmp location>
> <rm the LOCATION directory of t1>
> <cp/mv the copied file to the LOCATION path>
> invalidate metadata t1;
> select count(*) from t1; {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]