[Fix](hive-transactional-table) Fix NPE when query empty hive transactional table. (#27563)
This commit is contained in:
@ -90,6 +90,7 @@ import java.io.FileNotFoundException;
|
||||
import java.net.URI;
|
||||
import java.security.PrivilegedExceptionAction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -789,6 +790,9 @@ public class HiveMetaStoreCache {
|
||||
directory = AcidUtils.getAcidState(new Path(partition.getPath()), jobConf, validWriteIds, false,
|
||||
true);
|
||||
}
|
||||
if (directory == null || directory.getBaseDirectory() == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
if (!directory.getOriginalFiles().isEmpty()) {
|
||||
throw new Exception("Original non-ACID files in transactional tables are not supported");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user