xushiyan commented on code in PR #6016:
URL: https://github.com/apache/hudi/pull/6016#discussion_r1005459420
##########
hudi-common/src/main/java/org/apache/hudi/BaseHoodieTableFileIndex.java:
##########
@@ -172,14 +174,19 @@ public int getFileSlicesCount() {
.mapToInt(List::size).sum();
}
+ @Override
+ public void close() throws Exception {
+ resetTableMetadata(null);
+ }
+
protected List<PartitionPath> getAllQueryPartitionPaths() {
List<String> queryRelativePartitionPaths = queryPaths.stream()
- .map(path -> FSUtils.getRelativePartitionPath(new Path(basePath),
path))
+ .map(path -> FSUtils.getRelativePartitionPath(basePath, path))
.collect(Collectors.toList());
// Load all the partition path from the basePath, and filter by the query
partition path.
// TODO load files from the queryRelativePartitionPaths directly.
- List<String> matchedPartitionPaths =
FSUtils.getAllPartitionPaths(engineContext, metadataConfig, basePath)
+ List<String> matchedPartitionPaths = getAllPartitionPathsUnchecked()
Review Comment:
this change affects the tables which do not have both 1)
`hoodie.table.partition.fields` in table config, and 2) metadata disabled. A
partitioned table under these 2 conditions will be deemed as non-partitioned
table, and resulted in not loading any records.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]