Skip to content

Commit 5c91d87

Browse files
build(isthmus-cli): use GraalVM 25 (#515)
Benefits from Java 25 performance optimizations. Signed-off-by: Mark S. Lewis <[email protected]>
1 parent 1d022aa commit 5c91d87

File tree

7 files changed

+21
-104
lines changed

7 files changed

+21
-104
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
submodules: recursive
108108
- uses: actions/setup-java@v5
109109
with:
110-
java-version: 21
110+
java-version: 25
111111
distribution: graalvm
112112
- name: Setup Gradle
113113
uses: gradle/actions/setup-gradle@v4

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
submodules: recursive
2525
- uses: actions/setup-java@v5
2626
with:
27-
java-version: 21
27+
java-version: 25
2828
distribution: graalvm
2929
- name: Setup Gradle
3030
uses: gradle/actions/setup-gradle@v4

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
antlr = "4.13.2"
33
calcite = "1.40.0"
44
commons-lang3 = "[3.18.0,)"
5-
graal = "22.1.0"
5+
graal = "25.0.0"
66
graal-plugin = "0.11.0"
77
gradle-extensions = "2.0.0"
88
guava = "33.5.0-jre"

isthmus-cli/build.gradle.kts

Lines changed: 2 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -44,89 +44,6 @@ dependencies {
4444

4545
sourceSets { main { java.srcDir("build/generated/sources/version/") } }
4646

47-
val initializeAtBuildTime =
48-
listOf(
49-
"com.google.common.base.Platform",
50-
"com.google.common.base.Preconditions",
51-
"com.google.common.cache.CacheBuilder",
52-
"com.google.common.cache.LocalCache",
53-
"com.google.common.collect.CollectCollectors",
54-
"com.google.common.collect.ImmutableRangeSet",
55-
"com.google.common.collect.ImmutableSortedMap",
56-
"com.google.common.collect.Platform",
57-
"com.google.common.collect.Range",
58-
"com.google.common.collect.RegularImmutableMap",
59-
"com.google.common.collect.RegularImmutableSortedSet",
60-
"com.google.common.math.IntMath",
61-
"com.google.common.math.IntMath\$1",
62-
"com.google.common.primitives.Primitives",
63-
"com.google.common.util.concurrent.AbstractFuture",
64-
"com.google.common.util.concurrent.AbstractFuture\$UnsafeAtomicHelper",
65-
"com.google.common.util.concurrent.SettableFuture",
66-
"io.substrait.isthmus.cli.InitializeAtBuildTime",
67-
"io.substrait.isthmus.metadata.LambdaHandlerCache",
68-
"io.substrait.isthmus.metadata.LambdaMetadataSupplier",
69-
"io.substrait.isthmus.metadata.LegacyToLambdaGenerator",
70-
"org.apache.calcite.config.CalciteSystemProperty",
71-
"org.apache.calcite.linq4j.tree.Primitive",
72-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$AllPredicates",
73-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$Collation",
74-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$ColumnOrigin",
75-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$ColumnUniqueness",
76-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$CumulativeCost",
77-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$DistinctRowCount",
78-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$Distribution",
79-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$ExplainVisibility",
80-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$ExpressionLineage",
81-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$LowerBoundCost",
82-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$MaxRowCount",
83-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$Memory",
84-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$MinRowCount",
85-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$NodeTypes",
86-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$NonCumulativeCost",
87-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$Parallelism",
88-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$PercentageOriginalRows",
89-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$PopulationSize",
90-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$Predicates",
91-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$RowCount",
92-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$Selectivity",
93-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$Size",
94-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$TableReferences",
95-
"org.apache.calcite.rel.metadata.BuiltInMetadata\$UniqueKeys",
96-
"org.apache.calcite.rel.metadata.RelMdAllPredicates",
97-
"org.apache.calcite.rel.metadata.RelMdCollation",
98-
"org.apache.calcite.rel.metadata.RelMdColumnOrigins",
99-
"org.apache.calcite.rel.metadata.RelMdColumnUniqueness",
100-
"org.apache.calcite.rel.metadata.RelMdDistinctRowCount",
101-
"org.apache.calcite.rel.metadata.RelMdDistribution",
102-
"org.apache.calcite.rel.metadata.RelMdExplainVisibility",
103-
"org.apache.calcite.rel.metadata.RelMdExpressionLineage",
104-
"org.apache.calcite.rel.metadata.RelMdLowerBoundCost",
105-
"org.apache.calcite.rel.metadata.RelMdMaxRowCount",
106-
"org.apache.calcite.rel.metadata.RelMdMemory",
107-
"org.apache.calcite.rel.metadata.RelMdMinRowCount",
108-
"org.apache.calcite.rel.metadata.RelMdNodeTypes",
109-
"org.apache.calcite.rel.metadata.RelMdParallelism",
110-
"org.apache.calcite.rel.metadata.RelMdPercentageOriginalRows",
111-
"org.apache.calcite.rel.metadata.RelMdPopulationSize",
112-
"org.apache.calcite.rel.metadata.RelMdPredicates",
113-
"org.apache.calcite.rel.metadata.RelMdRowCount",
114-
"org.apache.calcite.rel.metadata.RelMdSelectivity",
115-
"org.apache.calcite.rel.metadata.RelMdSize",
116-
"org.apache.calcite.rel.metadata.RelMdTableReferences",
117-
"org.apache.calcite.rel.metadata.RelMdUniqueKeys",
118-
"org.apache.calcite.sql.SqlKind",
119-
"org.apache.calcite.util.BuiltInMethod",
120-
"org.apache.calcite.util.Pair",
121-
"org.apache.calcite.util.ReflectUtil",
122-
"org.apache.calcite.util.Util",
123-
"org.apache.commons.codec.language.Soundex",
124-
"org.slf4j.LoggerFactory",
125-
"org.slf4j.impl.JDK14LoggerAdapter",
126-
"org.slf4j.impl.StaticLoggerBinder",
127-
)
128-
.joinToString(",")
129-
13047
application { mainClass.set("io.substrait.isthmus.cli.IsthmusEntryPoint") }
13148

13249
graalvmNative {
@@ -138,13 +55,13 @@ graalvmNative {
13855
named("main") {
13956
imageName.set("isthmus")
14057
fallback.set(false)
141-
buildArgs.add("--initialize-at-build-time=${initializeAtBuildTime}")
14258
buildArgs.add("-H:IncludeResources=.*yaml")
14359
buildArgs.add("--report-unsupported-elements-at-runtime")
14460
buildArgs.add("-H:+ReportExceptionStackTraces")
14561
buildArgs.add("-H:DynamicProxyConfigurationFiles=${project.file("proxies.json")}")
14662
buildArgs.add("--features=io.substrait.isthmus.cli.RegisterAtRuntime")
147-
buildArgs.add("-J--enable-preview")
63+
buildArgs.add("--future-defaults=all")
64+
jvmArgs.add("--sun-misc-unsafe-memory-access=allow")
14865
}
14966
}
15067
}

isthmus-cli/src/test/script/smoke.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,32 @@
33
set -eu -o pipefail
44

55
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
6-
cd "${parent_path}"
7-
CMD=../../../build/native/nativeCompile/isthmus
8-
LINEITEM="CREATE TABLE LINEITEM (L_ORDERKEY BIGINT NOT NULL, L_PARTKEY BIGINT NOT NULL, L_SUPPKEY BIGINT NOT NULL, L_LINENUMBER INTEGER, L_QUANTITY DECIMAL, L_EXTENDEDPRICE DECIMAL, L_DISCOUNT DECIMAL, L_TAX DECIMAL, L_RETURNFLAG CHAR(1), L_LINESTATUS CHAR(1), L_SHIPDATE DATE, L_COMMITDATE DATE, L_RECEIPTDATE DATE, L_SHIPINSTRUCT CHAR(25), L_SHIPMODE CHAR(10), L_COMMENT VARCHAR(44))"
6+
cd "${parent_path}/../../.."
7+
CMD="${ISTHMUS:-build/native/nativeCompile/isthmus}"
8+
LINEITEM='CREATE TABLE LINEITEM (L_ORDERKEY BIGINT NOT NULL, L_PARTKEY BIGINT NOT NULL, L_SUPPKEY BIGINT NOT NULL, L_LINENUMBER INTEGER, L_QUANTITY DECIMAL, L_EXTENDEDPRICE DECIMAL, L_DISCOUNT DECIMAL, L_TAX DECIMAL, L_RETURNFLAG CHAR(1), L_LINESTATUS CHAR(1), L_SHIPDATE DATE, L_COMMITDATE DATE, L_RECEIPTDATE DATE, L_SHIPINSTRUCT CHAR(25), L_SHIPMODE CHAR(10), L_COMMENT VARCHAR(44))'
99
echo "${LINEITEM}"
1010
#set -x
1111

1212
# SQL Query - Simple
13-
$CMD 'select * from lineitem' --create "${LINEITEM}"
13+
"${CMD}" 'select * from lineitem' --create "${LINEITEM}"
1414

1515
# SQL Query - With condition
16-
$CMD 'select * from lineitem where l_orderkey > 10' --create "${LINEITEM}"
16+
"${CMD}" 'select * from lineitem where l_orderkey > 10' --create "${LINEITEM}"
1717

1818
# SQL Query - Aggregate
19-
$CMD 'select l_orderkey, count(l_partkey) from lineitem group by l_orderkey' --create "${LINEITEM}"
19+
"${CMD}" 'select l_orderkey, count(l_partkey) from lineitem group by l_orderkey' --create "${LINEITEM}"
2020

2121
# SQL Expression - Literal expression
22-
$CMD --expression '10'
22+
"${CMD}" --expression '10'
2323

2424
# SQL Expression - Reference expression
25-
$CMD --expression 'l_suppkey' --create "${LINEITEM}"
25+
"${CMD}" --expression 'l_suppkey' --create "${LINEITEM}"
2626

2727
# SQL Expression - Filter expression
28-
$CMD --expression 'l_orderkey > 10' --create "${LINEITEM}"
28+
"${CMD}" --expression 'l_orderkey > 10' --create "${LINEITEM}"
2929

3030
# SQL Expression - Projection expression (column-1)
31-
$CMD --expression 'l_orderkey + 9888486986' --create "${LINEITEM}"
31+
"${CMD}" --expression 'l_orderkey + 9888486986' --create "${LINEITEM}"
3232

3333
# SQL Expression - 03 Projection expression (column-1, column-2, column-3)
34-
$CMD --expression 'l_orderkey + 9888486986' 'l_orderkey * 2' 'l_orderkey > 10' 'l_orderkey in (10, 20)' --create "${LINEITEM}"
34+
"${CMD}" --expression 'l_orderkey + 9888486986' 'l_orderkey * 2' 'l_orderkey > 10' 'l_orderkey in (10, 20)' --create "${LINEITEM}"

isthmus-cli/src/test/script/tpch_smoke.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
set -eu -o pipefail
44

55
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
6-
cd "${parent_path}"
7-
CMD=../../../build/native/nativeCompile/isthmus
6+
cd "${parent_path}/../../.."
7+
CMD="${ISTHMUS:-build/native/nativeCompile/isthmus}"
88

9-
TPCH="../../../../isthmus/src/test/resources/tpch"
9+
TPCH="../isthmus/src/test/resources/tpch"
1010

1111
DDL=$(cat ${TPCH}/schema.sql)
1212
QUERY_FOLDER="${TPCH}/queries"
@@ -20,5 +20,5 @@ for QUERY_NUM in {1..22}; do
2020

2121
echo "Processing tpc-h query ${QUERY_NUM}"
2222
echo "${QUERY}"
23-
$CMD --create "${DDL}" -- "${QUERY}"
23+
"${CMD}" --create "${DDL}" -- "${QUERY}"
2424
done

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ After you've cloned the project through git, Substrait Java is built with a tool
1111
./gradlew build
1212
```
1313

14-
To build the Isthmus executable that enables Substrait plans to be generated for a SQL statement, first ensure that you have GraalVM JDK installed and its install location set in the `GRAALVM_HOME` environment variable, then execute the following:
14+
To build the Isthmus executable that enables Substrait plans to be generated for a SQL statement, first ensure that you have GraalVM 25 JDK installed and its install location set in the `GRAALVM_HOME` environment variable, then execute the following:
1515
```
1616
./gradlew nativeCompile
1717
```

0 commit comments

Comments
 (0)