[ https://issues.apache.org/jira/browse/IMPALA-12589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17795498#comment-17795498 ]
Riza Suminto edited comment on IMPALA-12589 at 12/11/23 8:02 PM: ----------------------------------------------------------------- IMPALA-11507 add handling for null relPath: [https://github.com/apache/impala/blob/8874ea07b68c09cee3c4e300b70706f3c5ea40af/fe/src/main/java/org/apache/impala/catalog/HdfsPartition.java#L233C31-L233C43] I assume that before IMPALA-11057 relPath must never be null. If that is true, by extension, the new FileDescriptor.getAbsolutePath() should also return empty string instead of null. This is because FileDescriptor.getAbsolutePath() is used as a fallback for FileDescriptor.getRelativePath(). was (Author: rizaon): IMPALA-11057 add handling for null relPath: [https://github.com/apache/impala/blob/8874ea07b68c09cee3c4e300b70706f3c5ea40af/fe/src/main/java/org/apache/impala/catalog/HdfsPartition.java#L233C31-L233C43] I assume that before IMPALA-11057 relPath must never be null. If that is true, by extension, the new FileDescriptor.getAbsolutePath() should also return empty string instead of null. This is because FileDescriptor.getAbsolutePath() is used as a fallback for FileDescriptor.getRelativePath(). > 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 > 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: issues-all-unsubscr...@impala.apache.org For additional commands, e-mail: issues-all-h...@impala.apache.org