Skip to content
Draft
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
16 changes: 15 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,15 @@ licenseReport {
renderers = arrayOf<ReportRenderer>(InventoryHtmlReportRenderer("report.html", "Backend"))
filters = arrayOf<DependencyFilter>(LicenseBundleNormalizer())
}
repositories { mavenCentral() }
repositories {
mavenCentral()
maven {
url = uri("https://repository.apache.org/content/repositories/orgapacheiceberg-1277/")
mavenContent {
releasesOnly()
}
}
}

allprojects {
// Gravitino Python client project didn't need to apply the Spotless plugin
Expand All @@ -111,6 +119,12 @@ allprojects {
repositories {
mavenCentral()
mavenLocal()
maven {
url = uri("https://repository.apache.org/content/repositories/orgapacheiceberg-1277/")
mavenContent {
releasesOnly()
}
}
}

plugins.withType<com.diffplug.gradle.spotless.SpotlessPlugin>().configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import java.util.Map;
import java.util.UUID;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.gravitino.NameIdentifier;
import org.apache.gravitino.Namespace;
import org.apache.gravitino.catalog.PropertiesMetadataHelpers;
Expand Down Expand Up @@ -663,18 +662,20 @@ public void testTableDistribution() {
IllegalArgumentException.class,
() -> icebergTable.transformDistribution(Distributions.HASH));
Assertions.assertTrue(
StringUtils.contains(
illegalArgumentException.getMessage(),
"Iceberg's Distribution Mode.HASH is distributed based on partition, but the partition is empty"));
illegalArgumentException
.getMessage()
.contains(
"Iceberg's Distribution Mode.HASH is distributed based on partition, but the partition is empty"));

illegalArgumentException =
Assertions.assertThrows(
IllegalArgumentException.class,
() -> icebergTable.transformDistribution(Distributions.RANGE));
Assertions.assertTrue(
StringUtils.contains(
illegalArgumentException.getMessage(),
"Iceberg's Distribution Mode.RANGE is distributed based on sortOrder or partition, but both are empty"));
illegalArgumentException
.getMessage()
.contains(
"Iceberg's Distribution Mode.RANGE is distributed based on sortOrder or partition, but both are empty"));

IcebergTable newTable =
IcebergTable.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,8 @@ public void testFormIcebergType() {

@Test
public void testFromNestedField() {
String colName = RandomStringUtils.randomAlphabetic(10);
String doc = RandomStringUtils.randomAlphabetic(20);
String colName = RandomStringUtils.insecure().nextAlphabetic(10);
String doc = RandomStringUtils.insecure().nextAlphabetic(20);
Types.NestedField colField =
Types.NestedField.optional(1, colName, Types.IntegerType.get(), doc);
IcebergColumn icebergColumn = ConvertUtil.fromNestedField(colField);
Expand All @@ -463,8 +463,8 @@ public void testFromNestedField() {
Assertions.assertTrue(
icebergColumn.dataType() instanceof org.apache.gravitino.rel.types.Types.IntegerType);

colName = RandomStringUtils.randomAlphabetic(10);
doc = RandomStringUtils.randomAlphabetic(20);
colName = RandomStringUtils.insecure().nextAlphabetic(10);
doc = RandomStringUtils.insecure().nextAlphabetic(20);
colField = Types.NestedField.required(1, colName, Types.StringType.get(), doc);
icebergColumn = ConvertUtil.fromNestedField(colField);
Assertions.assertEquals(icebergColumn.name(), colName);
Expand All @@ -473,8 +473,8 @@ public void testFromNestedField() {
Assertions.assertTrue(
icebergColumn.dataType() instanceof org.apache.gravitino.rel.types.Types.StringType);

colName = RandomStringUtils.randomAlphabetic(10);
doc = RandomStringUtils.randomAlphabetic(20);
colName = RandomStringUtils.insecure().nextAlphabetic(10);
doc = RandomStringUtils.insecure().nextAlphabetic(20);
colField = Types.NestedField.required(1, colName, Types.DateType.get(), doc);
icebergColumn = ConvertUtil.fromNestedField(colField);
Assertions.assertEquals(icebergColumn.name(), colName);
Expand All @@ -483,8 +483,8 @@ public void testFromNestedField() {
Assertions.assertTrue(
icebergColumn.dataType() instanceof org.apache.gravitino.rel.types.Types.DateType);

colName = RandomStringUtils.randomAlphabetic(10);
doc = RandomStringUtils.randomAlphabetic(20);
colName = RandomStringUtils.insecure().nextAlphabetic(10);
doc = RandomStringUtils.insecure().nextAlphabetic(20);
colField =
Types.NestedField.required(
1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import java.util.Set;
import java.util.stream.Collectors;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.gravitino.Catalog;
import org.apache.gravitino.NameIdentifier;
import org.apache.gravitino.Namespace;
Expand Down Expand Up @@ -1113,9 +1112,9 @@ public void testTableDistribution() {
sortOrders);
});
Assertions.assertTrue(
StringUtils.contains(
illegalArgumentException.getMessage(),
"Iceberg's Distribution Mode.HASH does not support set expressions."));
illegalArgumentException
.getMessage()
.contains("Iceberg's Distribution Mode.HASH does not support set expressions."));

distribution = Distributions.RANGE;
// Create a data table for Distributions.hash
Expand Down Expand Up @@ -1158,9 +1157,9 @@ public void testTableDistribution() {
sortOrders);
});
Assertions.assertTrue(
StringUtils.contains(
illegalArgumentException.getMessage(),
"Iceberg's Distribution Mode.RANGE not support set expressions."));
illegalArgumentException
.getMessage()
.contains("Iceberg's Distribution Mode.RANGE not support set expressions."));
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ commons-collections3 = "3.2.2"
commons-configuration1 = "1.6"
commons-dbcp2 = "2.11.0"
caffeine = "2.9.3"
iceberg = '1.10.1' # used for Gravitino Iceberg catalog and Iceberg REST service
iceberg = '1.10.2' # used for Gravitino Iceberg catalog and Iceberg REST service
iceberg4connector = "1.6.1" # used for compile connectors like Spark, Flink, etc
paimon = '1.2.0'
spark33 = "3.3.4"
Expand Down
Loading