1
0

[HUDI-3168] Fixing null schema with empty commit in incremental relation (#4513)

This commit is contained in:
Vinish Reddy
2022-01-05 22:13:10 +05:30
committed by GitHub
parent 75133f9942
commit eee715b3ff
2 changed files with 88 additions and 74 deletions

View File

@@ -110,6 +110,10 @@ public class S3EventsHoodieIncrSource extends HoodieIncrSource {
.option(DataSourceReadOptions.BEGIN_INSTANTTIME().key(), instantEndpts.getLeft())
.option(DataSourceReadOptions.END_INSTANTTIME().key(), instantEndpts.getRight());
Dataset<Row> source = metaReader.load(srcPath);
if (source.isEmpty()) {
return Pair.of(Option.empty(), instantEndpts.getRight());
}
String filter = "s3.object.size > 0";
if (!StringUtils.isNullOrEmpty(props.getString(Config.S3_KEY_PREFIX))) {