Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make project compilable against jdk8 #245

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions core/src/main/java/io/onetable/hudi/BaseFileUpdatesExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -231,22 +231,26 @@ private WriteStatus toWriteStatus(
return writeStatus;
}

private HoodieColumnRangeMetadata<Comparable> 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<String, HoodieColumnRangeMetadata<Comparable>> convertColStats(
String fileName, List<ColumnStat> columnStatMap) {
return columnStatMap.stream()
.filter(
entry -> !OneType.NON_SCALAR_TYPES.contains(entry.getField().getSchema().getDataType()))
.map(
columnStat ->
HoodieColumnRangeMetadata.<Comparable>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()));
}

Expand Down
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</modules>

<properties>
<java.version>8</java.version>
<java.version>1.8</java.version>
<avro.version>1.11.3</avro.version>
<log4j.version>2.17.2</log4j.version>
<junit.version>5.9.0</junit.version>
Expand Down Expand Up @@ -492,7 +492,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>${java.version}</release>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
Expand Down
Loading