Skip to content

Commit

Permalink
[AMORO-3084]: iceberg version bump to 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ConradJam authored and czy006 committed Dec 13, 2024
1 parent 24cec41 commit 6401772
Show file tree
Hide file tree
Showing 147 changed files with 226 additions and 44,469 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import org.apache.amoro.table.MixedTable;
import org.apache.amoro.utils.map.StructLikeCollections;
import org.apache.iceberg.PartitionSpec;
import org.apache.iceberg.StructLike;
import org.apache.iceberg.TableProperties;
import org.apache.iceberg.data.GenericAppenderFactory;
import org.apache.iceberg.data.IdentityPartitionConverters;
Expand All @@ -46,18 +45,6 @@ public IcebergRewriteExecutor(
super(input, table, structLikeCollections);
}

// TODO We can remove this override method after upgrading Iceberg version to 1.5+.
@Override
protected StructLike partition() {
StructLike partitionData = super.partition();
if (partitionData != null && partitionData.size() == 0) {
// Cast empty partition data to NULL to avoid creating empty partition directory.
return null;
} else {
return partitionData;
}
}

@Override
protected OptimizingDataReader dataReader() {
return new GenericCombinedIcebergDataReader(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@

import java.util.List;
import java.util.Map;
import java.util.UUID;

/** Basic implementation of {@link UnkeyedTable}, wrapping a {@link Table}. */
public class BasicUnkeyedTable implements UnkeyedTable, HasTableOperations {
Expand Down Expand Up @@ -318,4 +319,9 @@ public StructLikeMap<Map<String, String>> partitionProperty() {
public UpdatePartitionProperties updatePartitionProperties(Transaction transaction) {
return new PartitionPropertiesUpdate(this, transaction);
}

@Override
public UUID uuid() {
return UUID.fromString(this.operations().current().uuid());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,44 @@
import org.apache.iceberg.expressions.Expressions;
import org.apache.iceberg.types.Conversions;
import org.apache.iceberg.types.Types;
import org.junit.After;
import org.junit.Assert;
import org.junit.Assume;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;

import java.util.Arrays;
import java.util.List;
import java.util.Set;

@RunWith(Parameterized.class)
public class TestIcebergFindFiles extends TableTestBase {
public class TestIcebergFindFiles extends TestBase {

@Parameterized.Parameters(name = "formatVersion = {0}")
public static Object[] parameters() {
return new Object[] {1, 2};
public static List<Object> parameters() {
return Arrays.asList(1, 2);
}

@Rule public TemporaryFolder tempDir = new TemporaryFolder();

public TestIcebergFindFiles(int formatVersion) {
super(formatVersion);
this.formatVersion = formatVersion;
}

@Before
public void setUp() throws Exception {
this.tableDir = tempDir.newFolder();
this.tableDir.delete();
super.setupTable();
}

@After
public void cleanUp() throws Exception {
super.cleanupTables();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<url>https://amoro.apache.org</url>

<properties>
<flink.version>1.17.1</flink.version>
<flink.version>1.18.1</flink.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@
<url>https://amoro.apache.org</url>

<properties>
<kafka.version>3.2.3</kafka.version>
<assertj.version>3.21.0</assertj.version>
<testcontainers.version>1.17.2</testcontainers.version>
<flink.version>1.17.1</flink.version>
<testcontainers.version>1.18.3</testcontainers.version>
<flink.version>1.18.1</flink.version>
</properties>

<dependencies>
Expand All @@ -58,7 +57,7 @@

<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-flink-1.17</artifactId>
<artifactId>iceberg-flink-1.18</artifactId>
<version>${iceberg.version}</version>
<scope>provided</scope>
<exclusions>
Expand Down Expand Up @@ -99,7 +98,7 @@
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-kafka</artifactId>
<version>${flink.version}</version>
<version>3.2.0-1.18</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -184,7 +183,7 @@

<dependency>
<groupId>org.apache.iceberg</groupId>
<artifactId>iceberg-flink-1.17</artifactId>
<artifactId>iceberg-flink-1.18</artifactId>
<version>${iceberg.version}</version>
<classifier>tests</classifier>
<scope>test</scope>
Expand Down Expand Up @@ -275,9 +274,9 @@

<!-- exclude jackson-databind -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.vesion}</version>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-jackson</artifactId>
<version>2.15.3-18.0</version>
<scope>provided</scope>
</dependency>

Expand Down
Loading

0 comments on commit 6401772

Please sign in to comment.