Skip to content

Commit cbc94d8

Browse files
committed
vendor calcite 1.40
1 parent 36e233c commit cbc94d8

2 files changed

Lines changed: 125 additions & 0 deletions

File tree

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: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
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 protobuf_version = "3.25.5"
41+
def prefix = "org.apache.beam.vendor.calcite.v1_40_0"
42+
43+
List<String> packagesToRelocate = [
44+
"com.esri",
45+
"com.fasterxml",
46+
"com.google.common",
47+
"com.google.gson",
48+
"com.google.protobuf",
49+
"com.google.thirdparty",
50+
"com.google.uzaygezen",
51+
"com.jayway",
52+
"com.yahoo",
53+
"net.minidev",
54+
"org.apache.calcite",
55+
"org.apache.commons",
56+
"org.apache.http",
57+
"org.apiguardian.api",
58+
"org.codehaus",
59+
"org.objectweb",
60+
"org.pentaho",
61+
"org.yaml",
62+
]
63+
64+
vendorJava(
65+
dependencies: [
66+
"org.apache.calcite:calcite-core:$calcite_version",
67+
"org.apache.calcite:calcite-linq4j:$calcite_version",
68+
"org.apache.calcite.avatica:avatica-core:$avatica_version",
69+
70+
// BEAM-13616: Override the version of protobuf to patch a security vulnerability.
71+
// This override can be removed once we upgrade to a newer version of calcite that
72+
// depends on protobuf >= 3.19.2.
73+
"com.google.protobuf:protobuf-java:$protobuf_version",
74+
"com.google.protobuf:protobuf-java-util:$protobuf_version",
75+
],
76+
runtimeDependencies: [
77+
library.java.slf4j_api,
78+
],
79+
relocations: packagesToRelocate.collectEntries {
80+
[ (it): "${prefix}.${it}" ] + [ "jdbc:calcite:": "jdbc:beam-vendor-calcite:"]
81+
},
82+
exclusions: [
83+
// Code quality / Building annotations
84+
"com/google/errorprone/**",
85+
"com/google/j2objc/annotations/**",
86+
"javax/annotation/**",
87+
"org/checkerframework/**",
88+
"org/jmlspecs/**",
89+
"org/intellij/lang/annotations/**",
90+
"org/jetbrains/annotations/**",
91+
92+
// Runtime logging interface
93+
"org/slf4j/**",
94+
"org/apache/log4j/**",
95+
"org/apache/logging/log4j/**",
96+
"META-INF/versions/9/org/apache/logging/log4j/**",
97+
98+
// Optional loggers
99+
"org/apache/commons/logging/impl/AvalonLogger*",
100+
"org/apache/commons/logging/impl/LogKitLogger*",
101+
102+
// Optional JSON providers
103+
"com/jayway/jsonpath/spi/json/GsonJsonProvider*",
104+
"com/jayway/jsonpath/spi/json/JettisonProvider*",
105+
"com/jayway/jsonpath/spi/json/JsonOrgJsonProvider*",
106+
"com/jayway/jsonpath/spi/json/TapestryJsonProvider*",
107+
"com/jayway/jsonpath/spi/mapper/GsonMappingProvider*",
108+
"com/jayway/jsonpath/spi/mapper/JsonOrgMappingProvider*",
109+
"com/jayway/jsonpath/spi/mapper/TapestryMappingProvider*",
110+
111+
// Unused broken code
112+
"org/apache/commons/dbcp2/managed/**",
113+
"org/apache/commons/pool2/proxy/**",
114+
"org/codehaus/janino/AntCompilerAdapter*",
115+
116+
// Optional kotlin code
117+
"kotlin/**",
118+
119+
"**/module-info.class",
120+
],
121+
groupId: group,
122+
artifactId: "beam-vendor-calcite-1_40_0",
123+
version: version,
124+
)

0 commit comments

Comments
 (0)