From 73ae329a47a6d7cb9cd3a60be7083d58d5151a63 Mon Sep 17 00:00:00 2001 From: Martin Vahlensieck Date: Wed, 29 Oct 2025 15:23:31 +0100 Subject: [PATCH 1/4] Update dependencies --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 04d56bd..9db008b 100644 --- a/build.gradle +++ b/build.gradle @@ -50,7 +50,7 @@ java { withSourcesJar() } -def protobufVersion = "3.23.4" +def protobufVersion = '4.28.2' dependencies { @@ -61,7 +61,7 @@ dependencies { implementation group: 'com.google.protobuf', name: 'protobuf-java', version: protobufVersion // Apache Commons Lang - implementation group: "org.apache.commons", name: "commons-lang3", version: "3.17.0" + implementation group: "org.apache.commons", name: "commons-lang3", version: '3.18.0' // Logging implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.16' From 7700f127e7223fc59fa3cc448ce8a81118db7690 Mon Sep 17 00:00:00 2001 From: Martin Vahlensieck Date: Wed, 29 Oct 2025 15:23:31 +0100 Subject: [PATCH 2/4] Update Prism API --- build.gradle | 2 +- .../polypheny/jdbc/types/PolyDocument.java | 39 +++++++------------ 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/build.gradle b/build.gradle index 9db008b..900b04e 100644 --- a/build.gradle +++ b/build.gradle @@ -55,7 +55,7 @@ def protobufVersion = '4.28.2' dependencies { // Prism API files (protobuf files), needs to be implementation due to the prism-api-version.properties - implementation group: 'org.polypheny', name: 'prism', version: '1.9' + implementation group: 'org.polypheny', name: 'prism', version: '2.1' // Protobuf implementation group: 'com.google.protobuf', name: 'protobuf-java', version: protobufVersion diff --git a/src/main/java/org/polypheny/jdbc/types/PolyDocument.java b/src/main/java/org/polypheny/jdbc/types/PolyDocument.java index 7e1bfdd..9dbf808 100644 --- a/src/main/java/org/polypheny/jdbc/types/PolyDocument.java +++ b/src/main/java/org/polypheny/jdbc/types/PolyDocument.java @@ -18,13 +18,9 @@ import java.sql.SQLException; import java.util.HashMap; -import java.util.List; import java.util.stream.Collectors; -import org.polypheny.jdbc.utils.ProtoUtils; import org.polypheny.prism.ProtoDocument; -import org.polypheny.prism.ProtoEntry; import org.polypheny.prism.ProtoValue; -import org.polypheny.prism.ProtoValue.ValueCase; public class PolyDocument extends HashMap { @@ -40,31 +36,26 @@ public PolyDocument( HashMap entries ) { public PolyDocument( ProtoDocument document ) { super(); - document.getEntriesList().stream() - .filter( e -> e.getKey().getValueCase() == ValueCase.STRING ) - .forEach( e -> put( - e.getKey().getString().getString(), - new TypedValue( e.getValue() ) + document.getEntriesMap() + .forEach( ( k, v ) -> put( + k, + new TypedValue( v ) ) ); } - public ProtoDocument serialize() { - List protoEntries = entrySet().stream().map( entry -> { - ProtoValue protoKey = ProtoUtils.serializeAsProtoString( entry.getKey() ); - ProtoValue protoValue; - try { - protoValue = entry.getValue().serialize(); - } catch ( SQLException e ) { - throw new RuntimeException( "Should not be thrown. Unknown value encountered." ); - } - return ProtoEntry.newBuilder() - .setKey( protoKey ) - .setValue( protoValue ) - .build(); - } ).collect( Collectors.toList() ); + private ProtoValue serializeValue( TypedValue value ) { + try { + return value.serialize(); + } catch ( SQLException e ) { + throw new RuntimeException( "Cannot serialize value: ", e ); + } + } - return ProtoDocument.newBuilder().addAllEntries( protoEntries ).build(); + + public ProtoDocument serialize() { + return ProtoDocument.newBuilder().putAllEntries( entrySet().stream().collect( + Collectors.toMap( Entry::getKey, e -> serializeValue( e.getValue() ) ) ) ).build(); } } From 0c5c437f89fed2a308ba9a112fb7d0ce2d86e0f9 Mon Sep 17 00:00:00 2001 From: Martin Vahlensieck Date: Wed, 29 Oct 2025 15:34:58 +0100 Subject: [PATCH 3/4] Increase version number --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 900b04e..3f3acd2 100644 --- a/build.gradle +++ b/build.gradle @@ -12,8 +12,8 @@ group "org.polypheny" description = "A standards-compliant JDBC driver for Polypheny." -def versionMajor = 2 -def versionMinor = 4 +def versionMajor = 3 +def versionMinor = 0 def versionQualifier = "SNAPSHOT" version = versionMajor + "." + versionMinor + (versionQualifier != '' ? "-" + versionQualifier : '') From dd113e27bac59f9d8ed50eaafd0761b78ae526e0 Mon Sep 17 00:00:00 2001 From: Martin Vahlensieck Date: Wed, 19 Nov 2025 11:29:49 +0100 Subject: [PATCH 4/4] Use Polypheny branch with the new API --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d4de011..da6a50c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v4 with: repository: polypheny/Polypheny-DB - ref: master + ref: update-prism-api - name: Build Polypheny run: |