diff --git a/java/build.gradle.kts b/java/build.gradle.kts index bb73c481776..3c09fab6950 100644 --- a/java/build.gradle.kts +++ b/java/build.gradle.kts @@ -8,7 +8,6 @@ plugins { id("com.palantir.git-version") version "5.0.0" id("com.palantir.java-format") version "2.90.0" id("net.ltgt.errorprone") version "5.1.0" apply false - id("com.google.protobuf") version "0.10.0" apply false id("com.vanniktech.maven.publish") version "0.36.0" apply false } @@ -55,8 +54,6 @@ allprojects { tasks.withType { options.errorprone.disable("UnusedVariable") options.errorprone.disableWarningsInGeneratedCode = true - // ignore protobuf generated files - options.errorprone.excludedPaths = ".*/build/generated/.*" options.release = 17 options.compilerArgs.add("-Werror") diff --git a/java/gradle/libs.versions.toml b/java/gradle/libs.versions.toml index f3fc4184aa3..fcb5324c38e 100644 --- a/java/gradle/libs.versions.toml +++ b/java/gradle/libs.versions.toml @@ -10,7 +10,6 @@ junit-jupiter = "6.0.3" logback = "1.5.32" netty = "4.2.13.Final" nopen = "1.0.1" -protobuf = "4.34.1" slf4j = "2.0.17" spark3 = "3.5.8" spark4 = "4.1.1" @@ -31,7 +30,6 @@ logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "lo netty-bom = { module = "io.netty:netty-bom", version.ref = "netty" } nopen-annotations = { module = "com.jakewharton.nopen:nopen-annotations", version.ref = "nopen" } nopen-checker = { module = "com.jakewharton.nopen:nopen-checker", version.ref = "nopen" } -protobuf-java = { module = "com.google.protobuf:protobuf-java", version.ref = "protobuf" } slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "slf4j" } slf4j-simple = { module = "org.slf4j:slf4j-simple", version.ref = "slf4j" } s3mock-testcontainers = { module = "com.adobe.testing:s3mock-testcontainers", version.ref = "s3mock" } diff --git a/java/vortex-jni/build.gradle.kts b/java/vortex-jni/build.gradle.kts index c056184aada..e91477303c7 100644 --- a/java/vortex-jni/build.gradle.kts +++ b/java/vortex-jni/build.gradle.kts @@ -7,7 +7,6 @@ import org.gradle.kotlin.dsl.support.serviceOf plugins { `java-library` `jvm-test-suite` - id("com.google.protobuf") id("com.gradleup.shadow") version "9.4.1" } @@ -26,7 +25,6 @@ dependencies { errorprone(libs.nopen.checker) implementation(libs.guava) - implementation(libs.protobuf.java) compileOnly(libs.errorprone.annotations) compileOnly(libs.nopen.annotations) @@ -91,15 +89,8 @@ tasks.withType().all { ) } -protobuf { - protoc { - artifact = "com.google.protobuf:protoc:${libs.versions.protobuf.get()}" - } -} - -// shade guava and protobuf dependencies +// shade guava and arrow dependencies tasks.withType { - relocate("com.google.protobuf", "dev.vortex.relocated.com.google.protobuf") relocate("com.google.common", "dev.vortex.relocated.com.google.common") relocate("org.apache.arrow", "dev.vortex.relocated.org.apache.arrow") { // exclude C Data Interface since JNI cannot be relocated diff --git a/java/vortex-jni/src/main/proto/dtype.proto b/java/vortex-jni/src/main/proto/dtype.proto deleted file mode 120000 index 8c3d7c6cff7..00000000000 --- a/java/vortex-jni/src/main/proto/dtype.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../vortex-proto/proto/dtype.proto \ No newline at end of file diff --git a/java/vortex-jni/src/main/proto/expr.proto b/java/vortex-jni/src/main/proto/expr.proto deleted file mode 120000 index ab279b82e96..00000000000 --- a/java/vortex-jni/src/main/proto/expr.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../vortex-proto/proto/expr.proto \ No newline at end of file diff --git a/java/vortex-jni/src/main/proto/google/REUSE.toml b/java/vortex-jni/src/main/proto/google/REUSE.toml deleted file mode 100644 index f9819ff8a40..00000000000 --- a/java/vortex-jni/src/main/proto/google/REUSE.toml +++ /dev/null @@ -1,6 +0,0 @@ -version = 1 - -[[annotations]] -path = "**/*.proto" -SPDX-FileCopyrightText = "Copyright 2008 Google Inc." -SPDX-License-Identifier = "MIT" diff --git a/java/vortex-jni/src/main/proto/google/protobuf/struct.proto b/java/vortex-jni/src/main/proto/google/protobuf/struct.proto deleted file mode 100644 index 1bf0c1ad958..00000000000 --- a/java/vortex-jni/src/main/proto/google/protobuf/struct.proto +++ /dev/null @@ -1,95 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package google.protobuf; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/protobuf/types/known/structpb"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "StructProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; - -// `Struct` represents a structured data value, consisting of fields -// which map to dynamically typed values. In some languages, `Struct` -// might be supported by a native representation. For example, in -// scripting languages like JS a struct is represented as an -// object. The details of that representation are described together -// with the proto support for the language. -// -// The JSON representation for `Struct` is JSON object. -message Struct { - // Unordered map of dynamically typed values. - map fields = 1; -} - -// `Value` represents a dynamically typed value which can be either -// null, a number, a string, a boolean, a recursive struct value, or a -// list of values. A producer of value is expected to set one of these -// variants. Absence of any variant indicates an error. -// -// The JSON representation for `Value` is JSON value. -message Value { - // The kind of value. - oneof kind { - // Represents a null value. - NullValue null_value = 1; - // Represents a double value. - double number_value = 2; - // Represents a string value. - string string_value = 3; - // Represents a boolean value. - bool bool_value = 4; - // Represents a structured value. - Struct struct_value = 5; - // Represents a repeated `Value`. - ListValue list_value = 6; - } -} - -// `NullValue` is a singleton enumeration to represent the null value for the -// `Value` type union. -// -// The JSON representation for `NullValue` is JSON `null`. -enum NullValue { - // Null value. - NULL_VALUE = 0; -} - -// `ListValue` is a wrapper around a repeated field of values. -// -// The JSON representation for `ListValue` is JSON array. -message ListValue { - // Repeated field of dynamically typed values. - repeated Value values = 1; -} diff --git a/java/vortex-jni/src/main/proto/google/protobuf/wrappers.proto b/java/vortex-jni/src/main/proto/google/protobuf/wrappers.proto deleted file mode 100644 index e583e7c40be..00000000000 --- a/java/vortex-jni/src/main/proto/google/protobuf/wrappers.proto +++ /dev/null @@ -1,157 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Wrappers for primitive (non-message) types. These types were needed -// for legacy reasons and are not recommended for use in new APIs. -// -// Historically these wrappers were useful to have presence on proto3 primitive -// fields, but proto3 syntax has been updated to support the `optional` keyword. -// Using that keyword is now the strongly preferred way to add presence to -// proto3 primitive fields. -// -// A secondary usecase was to embed primitives in the `google.protobuf.Any` -// type: it is now recommended that you embed your value in your own wrapper -// message which can be specifically documented. -// -// These wrappers have no meaningful use within repeated fields as they lack -// the ability to detect presence on individual elements. -// These wrappers have no meaningful use within a map or a oneof since -// individual entries of a map or fields of a oneof can already detect presence. - -syntax = "proto3"; - -package google.protobuf; - -option cc_enable_arenas = true; -option go_package = "google.golang.org/protobuf/types/known/wrapperspb"; -option java_package = "com.google.protobuf"; -option java_outer_classname = "WrappersProto"; -option java_multiple_files = true; -option objc_class_prefix = "GPB"; -option csharp_namespace = "Google.Protobuf.WellKnownTypes"; - -// Wrapper message for `double`. -// -// The JSON representation for `DoubleValue` is JSON number. -// -// Not recommended for use in new APIs, but still useful for legacy APIs and -// has no plan to be removed. -message DoubleValue { - // The double value. - double value = 1; -} - -// Wrapper message for `float`. -// -// The JSON representation for `FloatValue` is JSON number. -// -// Not recommended for use in new APIs, but still useful for legacy APIs and -// has no plan to be removed. -message FloatValue { - // The float value. - float value = 1; -} - -// Wrapper message for `int64`. -// -// The JSON representation for `Int64Value` is JSON string. -// -// Not recommended for use in new APIs, but still useful for legacy APIs and -// has no plan to be removed. -message Int64Value { - // The int64 value. - int64 value = 1; -} - -// Wrapper message for `uint64`. -// -// The JSON representation for `UInt64Value` is JSON string. -// -// Not recommended for use in new APIs, but still useful for legacy APIs and -// has no plan to be removed. -message UInt64Value { - // The uint64 value. - uint64 value = 1; -} - -// Wrapper message for `int32`. -// -// The JSON representation for `Int32Value` is JSON number. -// -// Not recommended for use in new APIs, but still useful for legacy APIs and -// has no plan to be removed. -message Int32Value { - // The int32 value. - int32 value = 1; -} - -// Wrapper message for `uint32`. -// -// The JSON representation for `UInt32Value` is JSON number. -// -// Not recommended for use in new APIs, but still useful for legacy APIs and -// has no plan to be removed. -message UInt32Value { - // The uint32 value. - uint32 value = 1; -} - -// Wrapper message for `bool`. -// -// The JSON representation for `BoolValue` is JSON `true` and `false`. -// -// Not recommended for use in new APIs, but still useful for legacy APIs and -// has no plan to be removed. -message BoolValue { - // The bool value. - bool value = 1; -} - -// Wrapper message for `string`. -// -// The JSON representation for `StringValue` is JSON string. -// -// Not recommended for use in new APIs, but still useful for legacy APIs and -// has no plan to be removed. -message StringValue { - // The string value. - string value = 1; -} - -// Wrapper message for `bytes`. -// -// The JSON representation for `BytesValue` is JSON string. -// -// Not recommended for use in new APIs, but still useful for legacy APIs and -// has no plan to be removed. -message BytesValue { - // The bytes value. - bytes value = 1; -} diff --git a/java/vortex-jni/src/main/proto/scalar.proto b/java/vortex-jni/src/main/proto/scalar.proto deleted file mode 120000 index d7a0011b265..00000000000 --- a/java/vortex-jni/src/main/proto/scalar.proto +++ /dev/null @@ -1 +0,0 @@ -../../../../../vortex-proto/proto/scalar.proto \ No newline at end of file diff --git a/java/vortex-spark/build.gradle.kts b/java/vortex-spark/build.gradle.kts index 12cd759ec5e..69489f8349f 100644 --- a/java/vortex-spark/build.gradle.kts +++ b/java/vortex-spark/build.gradle.kts @@ -103,9 +103,8 @@ mavenPublishing { } } -// shade guava and protobuf dependencies +// shade guava and arrow dependencies tasks.withType { - relocate("com.google.protobuf", "dev.vortex.relocated.com.google.protobuf") relocate("com.google.common", "dev.vortex.relocated.com.google.common") relocate("org.apache.arrow", "dev.vortex.relocated.org.apache.arrow") { // exclude C Data Interface since JNI cannot be relocated