diff --git a/core/src/main/java/io/onetable/hudi/BaseFileUpdatesExtractor.java b/core/src/main/java/io/onetable/hudi/BaseFileUpdatesExtractor.java index 43b22362..d998415c 100644 --- a/core/src/main/java/io/onetable/hudi/BaseFileUpdatesExtractor.java +++ b/core/src/main/java/io/onetable/hudi/BaseFileUpdatesExtractor.java @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - + package io.onetable.hudi; import static io.onetable.collectors.CustomCollectors.toList; @@ -231,22 +231,26 @@ private WriteStatus toWriteStatus( return writeStatus; } + private HoodieColumnRangeMetadata convertColStat( + String fileName, ColumnStat columnStat) { + return HoodieColumnRangeMetadata.create( + fileName, + convertFromOneTablePath(columnStat.getField().getPath()), + (Comparable) columnStat.getRange().getMinValue(), + (Comparable) columnStat.getRange().getMaxValue(), + columnStat.getNumNulls(), + columnStat.getNumValues(), + columnStat.getTotalSize(), + -1L); + } + private Map> convertColStats( String fileName, List columnStatMap) { return columnStatMap.stream() .filter( entry -> !OneType.NON_SCALAR_TYPES.contains(entry.getField().getSchema().getDataType())) .map( - columnStat -> - HoodieColumnRangeMetadata.create( - fileName, - convertFromOneTablePath(columnStat.getField().getPath()), - (Comparable) columnStat.getRange().getMinValue(), - (Comparable) columnStat.getRange().getMaxValue(), - columnStat.getNumNulls(), - columnStat.getNumValues(), - columnStat.getTotalSize(), - -1L)) + columnStat -> convertColStat(fileName, columnStat)) .collect(Collectors.toMap(HoodieColumnRangeMetadata::getColumnName, Function.identity())); } diff --git a/pom.xml b/pom.xml index 8410bd7c..f432ea63 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ - 8 + 1.8 1.11.3 2.17.2 5.9.0 @@ -492,7 +492,8 @@ maven-compiler-plugin ${maven-compiler-plugin.version} - ${java.version} + ${java.version} + ${java.version}