Skip to content
Closed
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
10 changes: 9 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ jobs:
uses: actions/checkout@v4
with:
submodules: recursive
fetch-tags: true

- name: Fetch history and tags of submodules
# This is needed for `substrait-java` or one of its submodules to determine its version.
run: |-
git submodule foreach --recursive 'git fetch --unshallow || true'
cd substrait-java/substrait; git describe --tags

- name: Install Python
uses: actions/setup-python@v5
Expand All @@ -62,6 +69,7 @@ jobs:
if: ${{ matrix.producer == 'isthmus' }}
uses: gradle/actions/setup-gradle@v4
with:
cache-disabled: true
gradle-version: 8.8

- name: Build Isthmus
Expand All @@ -76,7 +84,7 @@ jobs:
cp substrait-java/isthmus/build/libs/*all.jar ./jars

- name: Run tests for ${{ matrix.producer }} producer
run: pytest -v -m produce_substrait_snapshot --producer=${{ matrix.producer }} substrait_consumer/
run: pytest -vs -m produce_substrait_snapshot --producer=${{ matrix.producer }} substrait_consumer/

- name: Run Ibis expression tests
if: ${{ matrix.producer == 'ibis' }}
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "substrait-java"]
path = substrait-java
url = https://github.com/substrait-io/substrait-java
url = https://github.com/ingomueller-net/substrait-java
4 changes: 3 additions & 1 deletion build-and-copy-isthmus-shadow-jar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
set -euo pipefail

echo "Building Isthmus"
cd substrait-java/isthmus; ../gradlew shadowJar
cd substrait-java/isthmus
../gradlew clean
../gradlew shadowJar
cd -
mkdir -p jars
cp substrait-java/isthmus/build/libs/*all.jar ./jars/
Expand Down
1 change: 1 addition & 0 deletions substrait_consumer/producers/isthmus_java.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@
ArrayListClass = jpype.JClass("java.util.ArrayList")
ListClass = jpype.JClass("java.util.List")
SqlToSubstraitClass = jpype.JClass("io.substrait.isthmus.SqlToSubstrait")
VersionClass = jpype.JClass("io.substrait.plan.Plan")
3 changes: 3 additions & 0 deletions substrait_consumer/producers/isthmus_producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def _produce_isthmus_substrait(sql_string, schema_list, validate=False):

from . import isthmus_java as java

version = java.VersionClass.class_.getPackage().getSpecificationVersion()
print("JPype version:", version)

sql_to_substrait = java.SqlToSubstraitClass()
java_sql_string = jpype.java.lang.String(sql_string)
plan = sql_to_substrait.execute(java_sql_string, schema_list)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,9 @@
},
"names": ["A", "ABS_A"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,9 @@
},
"names": ["ACOS_TAX"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,9 @@
},
"names": ["PS_PARTKEY", "PS_SUPPKEY", "ADD_KEY"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,9 @@
},
"names": ["ASIN_TAX"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -183,5 +183,9 @@
},
"names": ["ATAN_TAX"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,9 @@
},
"names": ["ATAN2_TAX"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,9 @@
},
"names": ["COS_SUPPLY"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@
},
"names": ["COUNT_SUPPLYCOST"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,9 @@
},
"names": ["EXPR$0"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,9 @@
},
"names": ["PS_PARTKEY", "DIVIDE_KEY"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,9 @@
},
"names": ["PS_PARTKEY", "EXP_KEY"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,9 @@
},
"names": ["MAX_SUPPLYCOST"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,9 @@
},
"names": ["MIN_SUPPLYCOST"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,9 @@
},
"names": ["PS_PARTKEY", "MODULUS_KEY"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,9 @@
},
"names": ["PS_PARTKEY", "MULTIPLY_KEY"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,9 @@
},
"names": ["A", "SIGN_A"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,9 @@
},
"names": ["SIN_SUPPLY"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,9 @@
},
"names": ["PS_PARTKEY", "SQRT_KEY"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,9 @@
},
"names": ["PS_PARTKEY", "PS_SUPPKEY", "SUBTRACT_KEY"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,9 @@
},
"names": ["SUM_SUPPLYCOST"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,9 @@
},
"names": ["TAN_SUPPLY"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,9 @@
},
"names": ["A", "B"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,9 @@
},
"names": ["C"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,9 @@
},
"names": ["A"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,9 @@
},
"names": ["A"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,9 @@
},
"names": ["EXPR$0"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,9 @@
},
"names": ["PS_AVAILQTY", "PS_PARTKEY"]
}
}]
}],
"version": {
"minorNumber": 69,
"producer": "isthmus"
}
}
Loading
Loading