Skip to content

Commit 92bbf63

Browse files
authored
vendor calcite 1.40 (#35661)
* vendor calcite 1.40 * Remove protobuf version pin
1 parent a097680 commit 92bbf63

File tree

3 files changed

+122
-1
lines changed

3 files changed

+122
-1
lines changed

sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/datagen/DataGeneratorRowFn.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.apache.beam.sdk.transforms.DoFn;
3131
import org.apache.beam.sdk.values.Row;
3232
import org.apache.beam.vendor.calcite.v1_28_0.org.apache.calcite.sql.type.SqlTypeName;
33-
import org.apache.beam.vendor.calcite.v1_28_0.org.apache.commons.lang.RandomStringUtils;
33+
import org.apache.beam.vendor.calcite.v1_28_0.org.apache.commons.lang3.RandomStringUtils;
3434
import org.joda.time.Duration;
3535
import org.joda.time.Instant;
3636

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ include(":sdks:typescript")
325325
include(":sdks:typescript:container")
326326
include(":vendor:grpc-1_69_0")
327327
include(":vendor:calcite-1_28_0")
328+
include(":vendor:calcite-1_40_0")
328329
include(":vendor:guava-32_1_2-jre")
329330
include(":website")
330331
include(":runners:google-cloud-dataflow-java:worker")

vendor/calcite-1_40_0/build.gradle

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* License); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an AS IS BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
/**
20+
* Vendored version of calcite.
21+
*
22+
* To upgrade:
23+
* 1. Use mvn dependency:tree and/or https://search.maven.org/search?q=g:org.apache.calcite%20AND%20a:calcite-core
24+
* to determine dependency tree. You may need to search for optional transitive dependencies
25+
* and determine if they need to be added or upgraded (e.g. protobuf)
26+
* 2. Validate built artifacts by running linkage tool
27+
* (https://github.com/apache/beam/tree/master/vendor#how-to-validate-the-vendored-dependencies)
28+
* and unit and integration tests in a PR.
29+
*/
30+
31+
plugins { id 'org.apache.beam.vendor-java' }
32+
33+
description = "Apache Beam :: Vendored Dependencies :: Calcite 1.40.0"
34+
35+
group = "org.apache.beam"
36+
version = "0.1"
37+
38+
def calcite_version = "1.40.0"
39+
def avatica_version = "1.26.0"
40+
def prefix = "org.apache.beam.vendor.calcite.v1_40_0"
41+
42+
List<String> packagesToRelocate = [
43+
"com.esri",
44+
"com.fasterxml",
45+
"com.google.common",
46+
"com.google.gson",
47+
"com.google.protobuf",
48+
"com.google.thirdparty",
49+
"com.google.uzaygezen",
50+
"com.jayway",
51+
"com.yahoo",
52+
"net.minidev",
53+
"org.apache.calcite",
54+
"org.apache.commons",
55+
"org.apache.http",
56+
"org.apiguardian.api",
57+
"org.codehaus",
58+
"org.objectweb",
59+
"org.pentaho",
60+
"org.yaml",
61+
]
62+
63+
vendorJava(
64+
dependencies: [
65+
"org.apache.calcite:calcite-core:$calcite_version",
66+
"org.apache.calcite:calcite-linq4j:$calcite_version",
67+
"org.apache.calcite.avatica:avatica-core:$avatica_version",
68+
],
69+
runtimeDependencies: [
70+
library.java.slf4j_api,
71+
],
72+
relocations: packagesToRelocate.collectEntries {
73+
[ (it): "${prefix}.${it}" ] + [ "jdbc:calcite:": "jdbc:beam-vendor-calcite:"]
74+
},
75+
exclusions: [
76+
// Code quality / Building annotations
77+
"com/google/errorprone/**",
78+
"com/google/j2objc/annotations/**",
79+
"javax/annotation/**",
80+
"org/checkerframework/**",
81+
"org/jmlspecs/**",
82+
"org/intellij/lang/annotations/**",
83+
"org/jetbrains/annotations/**",
84+
85+
// Runtime logging interface
86+
"org/slf4j/**",
87+
"org/apache/log4j/**",
88+
"org/apache/logging/log4j/**",
89+
"META-INF/versions/9/org/apache/logging/log4j/**",
90+
91+
// Optional loggers
92+
"org/apache/commons/logging/impl/AvalonLogger*",
93+
"org/apache/commons/logging/impl/LogKitLogger*",
94+
95+
// Optional JSON providers
96+
"com/jayway/jsonpath/spi/json/GsonJsonProvider*",
97+
"com/jayway/jsonpath/spi/json/JettisonProvider*",
98+
"com/jayway/jsonpath/spi/json/JsonOrgJsonProvider*",
99+
"com/jayway/jsonpath/spi/json/TapestryJsonProvider*",
100+
"com/jayway/jsonpath/spi/mapper/GsonMappingProvider*",
101+
"com/jayway/jsonpath/spi/mapper/JsonOrgMappingProvider*",
102+
"com/jayway/jsonpath/spi/mapper/TapestryMappingProvider*",
103+
104+
// Unused broken code
105+
"org/apache/commons/dbcp2/managed/**",
106+
"org/apache/commons/pool2/proxy/**",
107+
"org/codehaus/janino/AntCompilerAdapter*",
108+
109+
// Optional kotlin code
110+
"kotlin/**",
111+
112+
// maven poms
113+
"META-INF/maven/**",
114+
115+
"**/module-info.class",
116+
],
117+
groupId: group,
118+
artifactId: "beam-vendor-calcite-1_40_0",
119+
version: version,
120+
)

0 commit comments

Comments
 (0)