This is an automated email from the ASF dual-hosted git repository.
epugh pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new c02bea1e443 Update Calcite (branch_9x) - abandoned (#4599)
c02bea1e443 is described below
commit c02bea1e4433d570e8d140869e1a0b0b36ec2f66
Author: Solr Bot <[email protected]>
AuthorDate: Tue Aug 25 14:35:46 2026 +0200
Update Calcite (branch_9x) - abandoned (#4599)
Co-authored-by: Eric Pugh <[email protected]>
---
solr/licenses/avatica-core-1.25.0.jar.sha1 | 1 -
solr/licenses/avatica-core-1.28.0.jar.sha1 | 1 +
solr/licenses/avatica-metrics-1.25.0.jar.sha1 | 1 -
solr/licenses/avatica-metrics-1.28.0.jar.sha1 | 1 +
solr/licenses/calcite-core-1.37.0.jar.sha1 | 1 -
solr/licenses/calcite-core-1.42.0.jar.sha1 | 1 +
solr/licenses/calcite-linq4j-1.37.0.jar.sha1 | 1 -
solr/licenses/calcite-linq4j-1.42.0.jar.sha1 | 1 +
solr/licenses/commons-compiler-3.1.11.jar.sha1 | 1 -
solr/licenses/commons-compiler-3.1.12.jar.sha1 | 1 +
solr/licenses/janino-3.1.11.jar.sha1 | 1 -
solr/licenses/janino-3.1.12.jar.sha1 | 1 +
solr/licenses/joou-java-6-0.9.5.jar.sha1 | 1 +
solr/licenses/joou-java-6-LICENSE-ASL.txt | 174 +++++++++++++++++++++
solr/licenses/joou-java-6-NOTICE.txt | 2 +
.../apache/solr/handler/sql/CalciteSolrDriver.java | 7 +
.../org/apache/solr/handler/sql/SolrAggregate.java | 11 --
.../org/apache/solr/handler/sql/SolrFilter.java | 26 +--
.../org/apache/solr/handler/sql/SolrProject.java | 5 +-
.../org/apache/solr/handler/sql/SolrRules.java | 110 +++++++++----
.../java/org/apache/solr/handler/sql/SolrSort.java | 2 +-
.../handler/sql/SolrToEnumerableConverterRule.java | 18 ++-
.../apache/solr/handler/sql/TestSQLHandler.java | 148 ++++++++++++++++++
versions.lock | 35 +++--
versions.props | 4 +-
25 files changed, 468 insertions(+), 87 deletions(-)
diff --git a/solr/licenses/avatica-core-1.25.0.jar.sha1
b/solr/licenses/avatica-core-1.25.0.jar.sha1
deleted file mode 100644
index 1fe8f3a4af4..00000000000
--- a/solr/licenses/avatica-core-1.25.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-73b9a0e7032a5ae89f294091bc6cbb9a67a21101
diff --git a/solr/licenses/avatica-core-1.28.0.jar.sha1
b/solr/licenses/avatica-core-1.28.0.jar.sha1
new file mode 100644
index 00000000000..2aa1a25dfc7
--- /dev/null
+++ b/solr/licenses/avatica-core-1.28.0.jar.sha1
@@ -0,0 +1 @@
+d5e10c96fc7447ff2c42866a4676d45720b7d043
diff --git a/solr/licenses/avatica-metrics-1.25.0.jar.sha1
b/solr/licenses/avatica-metrics-1.25.0.jar.sha1
deleted file mode 100644
index 0b3586336b0..00000000000
--- a/solr/licenses/avatica-metrics-1.25.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-152f846d9f30a3e026530c2087ecd65c39bb304b
diff --git a/solr/licenses/avatica-metrics-1.28.0.jar.sha1
b/solr/licenses/avatica-metrics-1.28.0.jar.sha1
new file mode 100644
index 00000000000..9cdac73e35a
--- /dev/null
+++ b/solr/licenses/avatica-metrics-1.28.0.jar.sha1
@@ -0,0 +1 @@
+ccfcd1abf8a5eebbcf0364ada7a14c7ff24168bd
diff --git a/solr/licenses/calcite-core-1.37.0.jar.sha1
b/solr/licenses/calcite-core-1.37.0.jar.sha1
deleted file mode 100644
index 91d833404de..00000000000
--- a/solr/licenses/calcite-core-1.37.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-537a3281dfefbd7939d27785732a2aafddd3abcb
diff --git a/solr/licenses/calcite-core-1.42.0.jar.sha1
b/solr/licenses/calcite-core-1.42.0.jar.sha1
new file mode 100644
index 00000000000..9a691763667
--- /dev/null
+++ b/solr/licenses/calcite-core-1.42.0.jar.sha1
@@ -0,0 +1 @@
+7de9279a71383a1aba2c1b51ff294ccea75c1342
diff --git a/solr/licenses/calcite-linq4j-1.37.0.jar.sha1
b/solr/licenses/calcite-linq4j-1.37.0.jar.sha1
deleted file mode 100644
index 7e81d14286e..00000000000
--- a/solr/licenses/calcite-linq4j-1.37.0.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-92446d8dfc8e57289e6120a7efc6932650ed3410
diff --git a/solr/licenses/calcite-linq4j-1.42.0.jar.sha1
b/solr/licenses/calcite-linq4j-1.42.0.jar.sha1
new file mode 100644
index 00000000000..148b7747a44
--- /dev/null
+++ b/solr/licenses/calcite-linq4j-1.42.0.jar.sha1
@@ -0,0 +1 @@
+8ea854065930c333946766480246fb828f2756db
diff --git a/solr/licenses/commons-compiler-3.1.11.jar.sha1
b/solr/licenses/commons-compiler-3.1.11.jar.sha1
deleted file mode 100644
index e4a23a4f2e3..00000000000
--- a/solr/licenses/commons-compiler-3.1.11.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-19d5bfd402f91de0e670ef5783bf5c0a3f5ab478
diff --git a/solr/licenses/commons-compiler-3.1.12.jar.sha1
b/solr/licenses/commons-compiler-3.1.12.jar.sha1
new file mode 100644
index 00000000000..19facd11f2c
--- /dev/null
+++ b/solr/licenses/commons-compiler-3.1.12.jar.sha1
@@ -0,0 +1 @@
+0501779107b06a981ff359eab7369ff7a2bf077e
diff --git a/solr/licenses/janino-3.1.11.jar.sha1
b/solr/licenses/janino-3.1.11.jar.sha1
deleted file mode 100644
index 08e36c20aec..00000000000
--- a/solr/licenses/janino-3.1.11.jar.sha1
+++ /dev/null
@@ -1 +0,0 @@
-878a02f3ab98d37206c9852c025a46b86dc882d0
diff --git a/solr/licenses/janino-3.1.12.jar.sha1
b/solr/licenses/janino-3.1.12.jar.sha1
new file mode 100644
index 00000000000..6cdb19a7c1a
--- /dev/null
+++ b/solr/licenses/janino-3.1.12.jar.sha1
@@ -0,0 +1 @@
+ffcd3dfa84057ef76092b6b66c53871a97ae40b8
diff --git a/solr/licenses/joou-java-6-0.9.5.jar.sha1
b/solr/licenses/joou-java-6-0.9.5.jar.sha1
new file mode 100644
index 00000000000..e607b1e9e19
--- /dev/null
+++ b/solr/licenses/joou-java-6-0.9.5.jar.sha1
@@ -0,0 +1 @@
+1f994e53418fd5805c6a1d8f870802dedd2fb871
diff --git a/solr/licenses/joou-java-6-LICENSE-ASL.txt
b/solr/licenses/joou-java-6-LICENSE-ASL.txt
new file mode 100644
index 00000000000..298f0e2665e
--- /dev/null
+++ b/solr/licenses/joou-java-6-LICENSE-ASL.txt
@@ -0,0 +1,174 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
diff --git a/solr/licenses/joou-java-6-NOTICE.txt
b/solr/licenses/joou-java-6-NOTICE.txt
new file mode 100644
index 00000000000..1c98a08980f
--- /dev/null
+++ b/solr/licenses/joou-java-6-NOTICE.txt
@@ -0,0 +1,2 @@
+jOOU
+Copyright (c) Data Geekery GmbH (https://www.jooq.org)
diff --git
a/solr/modules/sql/src/java/org/apache/solr/handler/sql/CalciteSolrDriver.java
b/solr/modules/sql/src/java/org/apache/solr/handler/sql/CalciteSolrDriver.java
index 67609eb093a..70d56b73d55 100644
---
a/solr/modules/sql/src/java/org/apache/solr/handler/sql/CalciteSolrDriver.java
+++
b/solr/modules/sql/src/java/org/apache/solr/handler/sql/CalciteSolrDriver.java
@@ -97,7 +97,14 @@ public class CalciteSolrDriver extends Driver {
return calciteConnection;
}
+ @SuppressWarnings("deprecation")
private void registerUDFs() {
+ // register() is deprecated in favour of SqlOperatorTables.of/chain, but
Calcite's JDBC stack
+ // builds the validator's operator table via
CalcitePrepareImpl.createSqlValidator (private
+ // static), leaving no protected hook to chain a custom SqlOperatorTable
without subclassing
+ // private inner classes. Mutating the global SqlStdOperatorTable
singleton is the only viable
+ // injection point available through the public API today.
+ // See https://issues.apache.org/jira/browse/CALCITE-7730
final SqlStdOperatorTable stdOpTab = SqlStdOperatorTable.instance();
stdOpTab.register(new ArrayContainsAll());
stdOpTab.register(new ArrayContainsAny());
diff --git
a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrAggregate.java
b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrAggregate.java
index 6ff6ff95a84..1e3c2f7e226 100644
--- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrAggregate.java
+++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrAggregate.java
@@ -78,17 +78,6 @@ class SolrAggregate extends Aggregate implements SolrRel {
return new SolrAggregate(getCluster(), traitSet, hints, input, groupSet,
groupSets, aggCalls);
}
- @Override
- public Aggregate copy(
- RelTraitSet traitSet,
- RelNode input,
- boolean indicator,
- ImmutableBitSet groupSet,
- List<ImmutableBitSet> groupSets,
- List<AggregateCall> aggCalls) {
- return new SolrAggregate(getCluster(), traitSet, hints, input, groupSet,
groupSets, aggCalls);
- }
-
@Override
public void implement(Implementor implementor) {
implementor.visitChild(0, getInput());
diff --git
a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrFilter.java
b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrFilter.java
index c1a15aad586..486ef270fe8 100644
--- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrFilter.java
+++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrFilter.java
@@ -588,16 +588,15 @@ class SolrFilter extends Filter implements SolrRel {
}
if (left.getKind() == SqlKind.CAST && right.getKind() == SqlKind.CAST) {
- return translateBinary2(
- ((RexCall) left).getOperands().get(0), ((RexCall)
right).getOperands().get(0));
+ return translateBinary2(unwrapCast(left), unwrapCast(right));
}
- // for WHERE clause like: pdatex >= '2021-07-13T15:12:10.037Z'
+ // for WHERE clause like: pdatex >= CAST('2021-07-13 15:12:10.037' AS
TIMESTAMP)
+ // Calcite 1.42+ may nest multiple CASTs for timestamp coercion, so
unwrap recursively
if (left.getKind() == SqlKind.INPUT_REF && right.getKind() ==
SqlKind.CAST) {
- final RexCall cast = ((RexCall) right);
- if (cast.getOperands().size() == 1
- && cast.getOperands().get(0).getKind() == SqlKind.LITERAL) {
- return translateBinary2(left, cast.getOperands().get(0));
+ RexNode unwrapped = unwrapCast(right);
+ if (unwrapped.getKind() == SqlKind.LITERAL) {
+ return translateBinary2(left, unwrapped);
}
}
@@ -607,7 +606,7 @@ class SolrFilter extends Filter implements SolrRel {
String leftLit = toSolrLiteral("", (RexLiteral) left);
String rightLit = toSolrLiteral("", (RexLiteral) right);
if (!leftLit.equals(rightLit)) {
- // they are equal lits ~ match no docs
+ // unequal literals (e.g. WHERE 1=0) ~ match no docs
return new Pair<>("", (RexLiteral) right);
}
}
@@ -616,6 +615,13 @@ class SolrFilter extends Filter implements SolrRel {
}
/** Translates a call to a binary operator. Returns whether successful. */
+ protected static RexNode unwrapCast(RexNode node) {
+ while (node.getKind() == SqlKind.CAST) {
+ node = ((RexCall) node).getOperands().get(0);
+ }
+ return node;
+ }
+
protected Pair<String, RexLiteral> translateBinary2(RexNode left, RexNode
right) {
if (log.isDebugEnabled()) {
log.debug("translateBinary2 left={} right={}", left, right);
@@ -801,8 +807,8 @@ class SolrFilter extends Filter implements SolrRel {
if (operands.size() != 2) {
throw new AssertionError("Invalid number of arguments - " +
operands.size());
}
- final RexNode left = operands.get(0);
- final RexNode right = operands.get(1);
+ final RexNode left = unwrapCast(operands.get(0));
+ final RexNode right = unwrapCast(operands.get(1));
final Pair<String, RexLiteral> a = translateBinary2(left, right);
if (a != null) {
diff --git
a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrProject.java
b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrProject.java
index 835d4fea03a..87ac4633b8a 100644
--- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrProject.java
+++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrProject.java
@@ -17,7 +17,6 @@
package org.apache.solr.handler.sql;
import java.util.List;
-import org.apache.calcite.adapter.java.JavaTypeFactory;
import org.apache.calcite.plan.RelOptCluster;
import org.apache.calcite.plan.RelOptCost;
import org.apache.calcite.plan.RelOptPlanner;
@@ -57,9 +56,7 @@ class SolrProject extends Project implements SolrRel {
public void implement(Implementor implementor) {
implementor.visitChild(0, getInput());
final SolrRules.RexToSolrTranslator translator =
- new SolrRules.RexToSolrTranslator(
- (JavaTypeFactory) getCluster().getTypeFactory(),
- SolrRules.solrFieldNames(getInput().getRowType()));
+ new
SolrRules.RexToSolrTranslator(SolrRules.solrFieldNames(getInput().getRowType()));
for (Pair<RexNode, String> pair : getNamedProjects()) {
final String name = pair.right;
final String expr = pair.left.accept(translator);
diff --git
a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRules.java
b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRules.java
index a6e0b7416b2..d1bee3fb18b 100644
--- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRules.java
+++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrRules.java
@@ -19,10 +19,9 @@ package org.apache.solr.handler.sql;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.List;
-import java.util.function.Predicate;
-import org.apache.calcite.adapter.java.JavaTypeFactory;
import org.apache.calcite.plan.Convention;
import org.apache.calcite.plan.RelOptRule;
+import org.apache.calcite.plan.RelOptRuleCall;
import org.apache.calcite.plan.RelTraitSet;
import org.apache.calcite.rel.RelCollations;
import org.apache.calcite.rel.RelNode;
@@ -35,6 +34,7 @@ import org.apache.calcite.rel.logical.LogicalSort;
import org.apache.calcite.rel.type.RelDataType;
import org.apache.calcite.rex.RexCall;
import org.apache.calcite.rex.RexInputRef;
+import org.apache.calcite.rex.RexLiteral;
import org.apache.calcite.rex.RexNode;
import org.apache.calcite.rex.RexVisitorImpl;
import org.apache.calcite.sql.SqlKind;
@@ -67,12 +67,10 @@ class SolrRules {
/** Translator from {@link RexNode} to strings in Solr's expression
language. */
static class RexToSolrTranslator extends RexVisitorImpl<String> {
- private final JavaTypeFactory typeFactory;
private final List<String> inFields;
- RexToSolrTranslator(JavaTypeFactory typeFactory, List<String> inFields) {
+ RexToSolrTranslator(List<String> inFields) {
super(true);
- this.typeFactory = typeFactory;
this.inFields = inFields;
}
@@ -104,13 +102,8 @@ class SolrRules {
* Base class for planner rules that convert a relational expression to Solr
calling convention.
*/
abstract static class SolrConverterRule extends ConverterRule {
- SolrConverterRule(Class<? extends RelNode> clazz, String description) {
- this(clazz, relNode -> true, description);
- }
-
- <R extends RelNode> SolrConverterRule(
- Class<R> clazz, Predicate<RelNode> predicate, String description) {
- super(clazz, Convention.NONE, SolrRel.CONVENTION, description);
+ protected SolrConverterRule(ConverterRule.Config config) {
+ super(config);
}
}
@@ -118,7 +111,7 @@ class SolrRules {
private static class SolrFilterRule extends SolrConverterRule {
private static boolean isNotFilterByExpr(List<RexNode> rexNodes,
List<String> fieldNames) {
- // We dont have a way to filter by result of aggregator now
+ // We don't have a way to filter by result of aggregator now
boolean result = true;
for (RexNode rexNode : rexNodes) {
@@ -138,10 +131,24 @@ class SolrRules {
return isNotFilterByExpr(filterOperands,
SolrRules.solrFieldNames(relNode.getRowType()));
}
- private static final SolrFilterRule FILTER_RULE = new SolrFilterRule();
+ static final SolrFilterRule FILTER_RULE =
+ new SolrFilterRule(
+ ConverterRule.Config.INSTANCE
+ .withConversion(
+ LogicalFilter.class,
+ SolrFilterRule::filter,
+ Convention.NONE,
+ SolrRel.CONVENTION,
+ "SolrFilterRule")
+ .withRuleFactory(SolrFilterRule::new));
+
+ private SolrFilterRule(ConverterRule.Config config) {
+ super(config);
+ }
- private SolrFilterRule() {
- super(LogicalFilter.class, SolrFilterRule::filter, "SolrFilterRule");
+ @Override
+ public boolean matches(RelOptRuleCall call) {
+ return filter(call.rel(0));
}
@Override
@@ -155,10 +162,46 @@ class SolrRules {
/** Rule to convert a {@link LogicalProject} to a {@link SolrProject}. */
private static class SolrProjectRule extends SolrConverterRule {
- private static final SolrProjectRule PROJECT_RULE = new SolrProjectRule();
+ static final SolrProjectRule PROJECT_RULE =
+ new SolrProjectRule(
+ ConverterRule.Config.INSTANCE
+ .withConversion(
+ LogicalProject.class,
+ SolrProjectRule::isSupported,
+ Convention.NONE,
+ SolrRel.CONVENTION,
+ "SolrProjectRule")
+ .withRuleFactory(SolrProjectRule::new));
+
+ private SolrProjectRule(ConverterRule.Config config) {
+ super(config);
+ }
- private SolrProjectRule() {
- super(LogicalProject.class, "SolrProjectRule");
+ /**
+ * Reject projects where any expression is a bare literal (possibly
wrapped in CASTs). This
+ * prevents SolrProject from being created for Calcite 1.42+ plans where
constant-folding
+ * replaces a grouped field with a literal constant (e.g. WHERE str_s='a'
causes Calcite to
+ * substitute str_s with the literal 'a' in a DISTINCT output project).
Such projects must
+ * remain as {@link LogicalProject} so Calcite's enumerable layer handles
the substitution.
+ */
+ private static boolean isSupported(RelNode relNode) {
+ for (RexNode expr : ((LogicalProject) relNode).getProjects()) {
+ if (isLiteralExpr(expr)) return false;
+ }
+ return true;
+ }
+
+ /** Returns true if the expression is a literal, possibly wrapped in one
or more CASTs. */
+ private static boolean isLiteralExpr(RexNode node) {
+ while (node instanceof RexCall && node.getKind() == SqlKind.CAST) {
+ node = ((RexCall) node).getOperands().get(0);
+ }
+ return node instanceof RexLiteral;
+ }
+
+ @Override
+ public boolean matches(RelOptRuleCall call) {
+ return isSupported(call.rel(0));
}
@Override
@@ -173,10 +216,15 @@ class SolrRules {
/** Rule to convert a {@link LogicalSort} to a {@link SolrSort}. */
private static class SolrSortRule extends SolrConverterRule {
- static final SolrSortRule SORT_RULE = new SolrSortRule(LogicalSort.class,
"SolrSortRule");
+ static final SolrSortRule SORT_RULE =
+ new SolrSortRule(
+ ConverterRule.Config.INSTANCE
+ .withConversion(
+ LogicalSort.class, Convention.NONE, SolrRel.CONVENTION,
"SolrSortRule")
+ .withRuleFactory(SolrSortRule::new));
- SolrSortRule(Class<? extends RelNode> clazz, String description) {
- super(clazz, description);
+ private SolrSortRule(ConverterRule.Config config) {
+ super(config);
}
@Override
@@ -195,14 +243,18 @@ class SolrRules {
/** Rule to convert an {@link LogicalAggregate} to an {@link SolrAggregate}.
*/
private static class SolrAggregateRule extends SolrConverterRule {
- // private static final Predicate<RelNode> AGGREGATE_PREDICTE = relNode
->
- // Aggregate.IS_SIMPLE.apply(((LogicalAggregate)relNode));// &&
- // !((LogicalAggregate)relNode).containsDistinctCall();
-
- private static final RelOptRule AGGREGATE_RULE = new SolrAggregateRule();
+ static final SolrAggregateRule AGGREGATE_RULE =
+ new SolrAggregateRule(
+ ConverterRule.Config.INSTANCE
+ .withConversion(
+ LogicalAggregate.class,
+ Convention.NONE,
+ SolrRel.CONVENTION,
+ "SolrAggregateRule")
+ .withRuleFactory(SolrAggregateRule::new));
- private SolrAggregateRule() {
- super(LogicalAggregate.class, "SolrAggregateRule");
+ private SolrAggregateRule(ConverterRule.Config config) {
+ super(config);
}
@Override
diff --git
a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrSort.java
b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrSort.java
index 82799d864a7..f5fb75d9d48 100644
--- a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrSort.java
+++ b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrSort.java
@@ -80,7 +80,7 @@ class SolrSort extends Sort implements SolrRel {
}
if (fetch != null) {
- implementor.setLimit(((RexLiteral) fetch).getValue().toString());
+ implementor.setLimit(((RexLiteral) fetch).getValue2().toString());
}
if (offset != null && offset instanceof RexLiteral) {
diff --git
a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrToEnumerableConverterRule.java
b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrToEnumerableConverterRule.java
index ff9ac210bea..8c6f8d27442 100644
---
a/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrToEnumerableConverterRule.java
+++
b/solr/modules/sql/src/java/org/apache/solr/handler/sql/SolrToEnumerableConverterRule.java
@@ -26,14 +26,18 @@ import org.apache.calcite.rel.convert.ConverterRule;
* EnumerableConvention}.
*/
class SolrToEnumerableConverterRule extends ConverterRule {
- static final ConverterRule INSTANCE = new SolrToEnumerableConverterRule();
+ static final ConverterRule INSTANCE =
+ new SolrToEnumerableConverterRule(
+ ConverterRule.Config.INSTANCE
+ .withConversion(
+ RelNode.class,
+ SolrRel.CONVENTION,
+ EnumerableConvention.INSTANCE,
+ "SolrToEnumerableConverterRule")
+ .withRuleFactory(SolrToEnumerableConverterRule::new));
- private SolrToEnumerableConverterRule() {
- super(
- RelNode.class,
- SolrRel.CONVENTION,
- EnumerableConvention.INSTANCE,
- "SolrToEnumerableConverterRule");
+ private SolrToEnumerableConverterRule(ConverterRule.Config config) {
+ super(config);
}
@Override
diff --git
a/solr/modules/sql/src/test/org/apache/solr/handler/sql/TestSQLHandler.java
b/solr/modules/sql/src/test/org/apache/solr/handler/sql/TestSQLHandler.java
index aa3886f0949..f3c84199cab 100644
--- a/solr/modules/sql/src/test/org/apache/solr/handler/sql/TestSQLHandler.java
+++ b/solr/modules/sql/src/test/org/apache/solr/handler/sql/TestSQLHandler.java
@@ -3464,4 +3464,152 @@ public class TestSQLHandler extends SolrCloudTestCase {
expectResults(
"select id, stringxmv from $ALIAS WHERE array_contains_any(stringxmv,
('a', 'e'))", 3);
}
+
+ /**
+ * Calcite 1.42+ constant-folds a WHERE predicate on the exact
grouped/aggregated column into a
+ * literal in the output project. These tests verify that the grouped column
value is returned
+ * correctly (not null) when the WHERE filters on the same column as GROUP
BY or DISTINCT.
+ */
+ @Test
+ public void testGroupByWhereOnGroupedColumn() throws Exception {
+ new UpdateRequest()
+ .add("id", "1", "str_s", "a", "field_i", "7")
+ .add("id", "2", "str_s", "b", "field_i", "8")
+ .add("id", "3", "str_s", "a", "field_i", "20")
+ .add("id", "4", "str_s", "b", "field_i", "11")
+ .add("id", "5", "str_s", "c", "field_i", "30")
+ .commit(cluster.getSolrClient(), COLLECTIONORALIAS);
+
+ String baseUrl =
+ cluster.getJettySolrRunners().get(0).getBaseUrl().toString() + "/" +
COLLECTIONORALIAS;
+
+ // WHERE on the exact grouped column (equality) — Calcite 1.42 may
constant-fold str_s to 'a'
+ SolrParams sParams =
+ params(
+ CommonParams.QT,
+ "/sql",
+ "aggregationMode",
+ "facet",
+ "stmt",
+ "select str_s, count(*), sum(field_i) from collection1"
+ + " where str_s = 'a' group by str_s order by str_s asc");
+
+ List<Tuple> tuples = getTuples(sParams, baseUrl);
+ assertEquals(1, tuples.size());
+ Tuple tuple = tuples.get(0);
+ assertEquals(
+ "str_s must not be null-folded by Calcite constant folding", "a",
tuple.get("str_s"));
+ assertEquals(2, tuple.getDouble("EXPR$1"), 0.0); // count(*)
+ assertEquals(27, tuple.getDouble("EXPR$2"), 0.0); // sum(field_i)
+
+ // Same query in map_reduce mode
+ sParams =
+ params(
+ CommonParams.QT,
+ "/sql",
+ "aggregationMode",
+ "map_reduce",
+ "stmt",
+ "select str_s, count(*), sum(field_i) from collection1"
+ + " where str_s = 'a' group by str_s order by str_s asc");
+
+ tuples = getTuples(sParams, baseUrl);
+ assertEquals(1, tuples.size());
+ tuple = tuples.get(0);
+ assertEquals(
+ "str_s must not be null-folded by Calcite constant folding", "a",
tuple.get("str_s"));
+ assertEquals(2, tuple.getDouble("EXPR$1"), 0.0);
+ assertEquals(27, tuple.getDouble("EXPR$2"), 0.0);
+
+ // WHERE on grouped column using IN — multiple constant-folded values
+ sParams =
+ params(
+ CommonParams.QT,
+ "/sql",
+ "aggregationMode",
+ "facet",
+ "stmt",
+ "select str_s, count(*) from collection1"
+ + " where str_s in ('a', 'b') group by str_s order by str_s
asc");
+
+ tuples = getTuples(sParams, baseUrl);
+ assertEquals(2, tuples.size());
+ assertEquals("a", tuples.get(0).get("str_s"));
+ assertEquals(2, tuples.get(0).getDouble("EXPR$1"), 0.0);
+ assertEquals("b", tuples.get(1).get("str_s"));
+ assertEquals(2, tuples.get(1).getDouble("EXPR$1"), 0.0);
+
+ // WHERE on a NON-grouped column — grouped column must still be present
+ sParams =
+ params(
+ CommonParams.QT,
+ "/sql",
+ "aggregationMode",
+ "facet",
+ "stmt",
+ "select str_s, count(*), sum(field_i) from collection1"
+ + " where field_i > 10 group by str_s order by str_s asc");
+
+ tuples = getTuples(sParams, baseUrl);
+ assertEquals(3, tuples.size());
+ assertEquals("a", tuples.get(0).get("str_s"));
+ assertEquals(1, tuples.get(0).getDouble("EXPR$1"), 0.0); // only id=3
(field_i=20)
+ assertEquals("b", tuples.get(1).get("str_s"));
+ assertEquals(1, tuples.get(1).getDouble("EXPR$1"), 0.0); // only id=4
(field_i=11)
+ assertEquals("c", tuples.get(2).get("str_s"));
+ assertEquals(1, tuples.get(2).getDouble("EXPR$1"), 0.0); // id=5
(field_i=30)
+ }
+
+ /**
+ * Verifies that DISTINCT queries with WHERE predicates on the distinct
columns return the correct
+ * (non-null) column values — the companion test to testSelectDistinct's
predicate sub-case,
+ * covering additional patterns not exercised by the existing tests.
+ */
+ @Test
+ public void testDistinctWhereOnDistinctColumn() throws Exception {
+ new UpdateRequest()
+ .add("id", "1", "str_s", "a", "field_i", "1")
+ .add("id", "2", "str_s", "b", "field_i", "2")
+ .add("id", "3", "str_s", "a", "field_i", "20")
+ .add("id", "4", "str_s", "c", "field_i", "30")
+ .add("id", "5", "str_s", "c", "field_i", "50")
+ .commit(cluster.getSolrClient(), COLLECTIONORALIAS);
+
+ String baseUrl =
+ cluster.getJettySolrRunners().get(0).getBaseUrl().toString() + "/" +
COLLECTIONORALIAS;
+
+ // WHERE on one of the DISTINCT columns (facet mode)
+ SolrParams sParams =
+ params(
+ CommonParams.QT,
+ "/sql",
+ "aggregationMode",
+ "facet",
+ "stmt",
+ "select distinct str_s, field_i from collection1"
+ + " where str_s = 'a' order by field_i asc");
+
+ List<Tuple> tuples = getTuples(sParams, baseUrl);
+ assertEquals(2, tuples.size());
+ assertEquals("a", tuples.get(0).get("str_s"));
+ assertEquals(1L, tuples.get(0).getLong("field_i").longValue());
+ assertEquals("a", tuples.get(1).get("str_s"));
+ assertEquals(20L, tuples.get(1).getLong("field_i").longValue());
+
+ // WHERE on a NON-distinct column — distinct column must still be present
+ // Data with field_i>10: id=3 (a,20), id=4 (c,30), id=5 (c,50) → DISTINCT
str_s = {a, c}
+ sParams =
+ params(
+ CommonParams.QT,
+ "/sql",
+ "aggregationMode",
+ "facet",
+ "stmt",
+ "select distinct str_s from collection1 where field_i > 10 order
by str_s asc");
+
+ tuples = getTuples(sParams, baseUrl);
+ assertEquals(2, tuples.size());
+ assertEquals("a", tuples.get(0).get("str_s"));
+ assertEquals("c", tuples.get(1).get("str_s"));
+ }
}
diff --git a/versions.lock b/versions.lock
index f029def82e7..c1e21d0774b 100644
--- a/versions.lock
+++ b/versions.lock
@@ -5,9 +5,9 @@ com.carrotsearch:hppc:0.10.0 (2 constraints: d40fecb0)
com.carrotsearch.randomizedtesting:randomizedtesting-runner:2.9.1 (2
constraints: d01534e2)
com.cybozu.labs:langdetect:1.1-20120112 (1 constraints: 5c066d5e)
com.fasterxml.jackson:jackson-bom:2.22.2 (12 constraints: 01002c6d)
-com.fasterxml.jackson.core:jackson-annotations:2.22 (15 constraints: 601c68f0)
-com.fasterxml.jackson.core:jackson-core:2.22.2 (16 constraints: 38453dc8)
-com.fasterxml.jackson.core:jackson-databind:2.22.2 (36 constraints: 608343b6)
+com.fasterxml.jackson.core:jackson-annotations:2.22 (15 constraints: 6e1c6df7)
+com.fasterxml.jackson.core:jackson-core:2.22.2 (16 constraints: 4645aec9)
+com.fasterxml.jackson.core:jackson-databind:2.22.2 (36 constraints: 6e8334d7)
com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:2.22.2 (2
constraints: 611c95f1)
com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.22.2 (2 constraints:
e919847a)
com.fasterxml.jackson.dataformat:jackson-dataformat-smile:2.22.2 (1
constraints: b80ea666)
@@ -43,9 +43,9 @@ com.google.cloud:google-cloud-core-grpc:2.71.0 (2
constraints: 8c1eaeaa)
com.google.cloud:google-cloud-core-http:2.71.0 (2 constraints: 8c1eaeaa)
com.google.cloud:google-cloud-storage:2.69.0 (2 constraints: e31cb828)
com.google.code.gson:gson:2.13.2 (11 constraints: e3a1774a)
-com.google.errorprone:error_prone_annotations:2.31.0 (22 constraints: 522f405d)
+com.google.errorprone:error_prone_annotations:2.31.0 (22 constraints: 572f525d)
com.google.guava:failureaccess:1.0.3 (6 constraints: cb636b42)
-com.google.guava:guava:33.6.0-jre (23 constraints: e85806a5)
+com.google.guava:guava:33.6.0-jre (23 constraints: fa5869aa)
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava (6
constraints: b5b5e9b2)
com.google.http-client:google-http-client:2.1.0 (13 constraints: 9dd91ca6)
com.google.http-client:google-http-client-apache-v2:2.1.0 (3 constraints:
b92edcec)
@@ -54,14 +54,14 @@ com.google.http-client:google-http-client-gson:2.1.0 (9
constraints: a08b1639)
com.google.http-client:google-http-client-jackson2:2.1.0 (2 constraints:
1e1ea573)
com.google.j2objc:j2objc-annotations:3.1 (7 constraints: 05738e58)
com.google.oauth-client:google-oauth-client:1.39.0 (3 constraints: 2b2f0445)
-com.google.protobuf:protobuf-java:4.35.1 (10 constraints: aa91b1d0)
+com.google.protobuf:protobuf-java:4.35.1 (10 constraints: ad91bcd0)
com.google.protobuf:protobuf-java-util:4.35.1 (7 constraints: a85b007d)
com.google.re2j:re2j:1.8 (4 constraints: ab350084)
com.googlecode.json-simple:json-simple:1.1.1 (1 constraints: d90f7798)
com.helger:profiler:1.1.1 (1 constraints: e21053b8)
com.ibm.icu:icu4j:74.2 (1 constraints: ae0f2484)
com.j256.simplemagic:simplemagic:1.17 (1 constraints: dd04f830)
-com.jayway.jsonpath:json-path:2.10.0 (2 constraints: 97122538)
+com.jayway.jsonpath:json-path:2.10.0 (2 constraints: bf12ce4a)
com.knuddels:jtokkit:1.1.0 (1 constraints: 9d0e146a)
com.lmax:disruptor:3.4.4 (1 constraints: 0d050a36)
com.squareup.okhttp3:okhttp:5.4.0 (11 constraints: a49b7f8e)
@@ -176,15 +176,15 @@ net.sf.jopt-simple:jopt-simple:5.0.4 (3 constraints:
132590bf)
net.sourceforge.argparse4j:argparse4j:0.7.0 (1 constraints: fe0a06e8)
net.thisptr:jackson-jq:0.0.13 (1 constraints: 3605223b)
org.antlr:antlr4-runtime:4.11.1 (1 constraints: f70fbd96)
-org.apache.calcite:calcite-core:1.37.0 (1 constraints: 3d05463b)
-org.apache.calcite:calcite-linq4j:1.37.0 (2 constraints: cf12444c)
-org.apache.calcite.avatica:avatica-core:1.25.0 (3 constraints: 0121ddcc)
-org.apache.calcite.avatica:avatica-metrics:1.25.0 (1 constraints: 9b104fc4)
+org.apache.calcite:calcite-core:1.42.0 (1 constraints: 39053b3b)
+org.apache.calcite:calcite-linq4j:1.42.0 (2 constraints: c7128a4b)
+org.apache.calcite.avatica:avatica-core:1.28.0 (3 constraints: 0a2175ce)
+org.apache.calcite.avatica:avatica-metrics:1.28.0 (1 constraints: 9e1058c4)
org.apache.commons:commons-collections4:4.6.0 (3 constraints: 4818bfcc)
org.apache.commons:commons-compress:1.28.0 (3 constraints: a91fa2f4)
org.apache.commons:commons-configuration2:2.15.1 (1 constraints: 3b053f3b)
org.apache.commons:commons-exec:1.6.0 (1 constraints: 09050236)
-org.apache.commons:commons-lang3:3.20.0 (5 constraints: 3a422d95)
+org.apache.commons:commons-lang3:3.20.0 (4 constraints: ac34c643)
org.apache.commons:commons-math3:3.6.1 (4 constraints: 9c2589e7)
org.apache.commons:commons-text:1.15.0 (2 constraints: 681fa0e5)
org.apache.curator:curator-client:5.9.0 (2 constraints: f01434a4)
@@ -199,8 +199,8 @@ org.apache.hadoop.thirdparty:hadoop-shaded-guava:1.5.0 (1
constraints: 0805ff35)
org.apache.httpcomponents:httpclient:4.5.14 (10 constraints: 6e9cc932)
org.apache.httpcomponents:httpcore:4.4.16 (9 constraints: a48fb4f0)
org.apache.httpcomponents:httpmime:4.5.14 (1 constraints: 40054f3b)
-org.apache.httpcomponents.client5:httpclient5:5.6.4 (2 constraints: 6820b745)
-org.apache.httpcomponents.core5:httpcore5:5.4.3 (4 constraints: 00460e3e)
+org.apache.httpcomponents.client5:httpclient5:5.6.4 (2 constraints: 0c208d14)
+org.apache.httpcomponents.core5:httpcore5:5.4.3 (4 constraints: 0346de3f)
org.apache.httpcomponents.core5:httpcore5-h2:5.4.3 (1 constraints: 4013123c)
org.apache.kafka:kafka-clients:3.9.2 (13 constraints: 7db456b4)
org.apache.kafka:kafka-group-coordinator:3.9.2 (2 constraints: aa1748bd)
@@ -272,9 +272,9 @@ org.carrot2:carrot2-core:4.5.1 (1 constraints: 0c050f36)
org.carrot2:morfologik-fsa:2.1.9 (1 constraints: db0d9c36)
org.carrot2:morfologik-polish:2.1.9 (1 constraints: d312541e)
org.carrot2:morfologik-stemming:2.1.9 (2 constraints: d81fb300)
-org.checkerframework:checker-qual:3.49.0 (4 constraints: 693aef91)
-org.codehaus.janino:commons-compiler:3.1.11 (2 constraints: 83195319)
-org.codehaus.janino:janino:3.1.11 (1 constraints: 8e0d433a)
+org.checkerframework:checker-qual:3.49.0 (4 constraints: 573a3290)
+org.codehaus.janino:commons-compiler:3.1.12 (2 constraints: 85197919)
+org.codehaus.janino:janino:3.1.12 (1 constraints: 8f0d443a)
org.codehaus.woodstox:stax2-api:4.3.0 (4 constraints: 5d338b6e)
org.conscrypt:conscrypt-openjdk-uber:2.5.2 (3 constraints: 193286c8)
org.eclipse.jetty:jetty-alpn-client:10.0.26 (3 constraints: f72e3161)
@@ -321,6 +321,7 @@ org.jetbrains:annotations:17.0.0 (2 constraints: 371c92e0)
org.jetbrains.kotlin:kotlin-stdlib:2.2.21 (10 constraints: 929b3d90)
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10 (2 constraints: f31f0a21)
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10 (6 constraints: 745eefc1)
+org.jooq:joou-java-6:0.9.5 (3 constraints: e32b4b84)
org.jspecify:jspecify:1.0.0 (8 constraints: 577d1349)
org.junit:junit-bom:6.1.2 (1 constraints: c2115cde)
org.locationtech.jts:jts-core:1.19.0 (2 constraints: a31de760)
diff --git a/versions.props b/versions.props
index 61238feb2e3..9d003cda966 100644
--- a/versions.props
+++ b/versions.props
@@ -41,8 +41,8 @@ net.bytebuddy:*=1.18.11
net.java.dev.jna:jna=5.19.1
net.thisptr:jackson-jq=0.0.13
no.nav.security:mock-oauth2-server=0.5.10
-org.apache.calcite.avatica:avatica-core=1.25.0
-org.apache.calcite:*=1.37.0
+org.apache.calcite.avatica:avatica-core=1.28.0
+org.apache.calcite:*=1.42.0
org.apache.commons:commons-collections4=4.6.0
org.apache.commons:commons-compress=1.28.0
org.apache.commons:commons-configuration2=2.15.1