(calcite) tag calcite-1.28.0 updated (18b044d725 -> 2326cf8dc9)

2023-11-13 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to tag calcite-1.28.0
in repository https://gitbox.apache.org/repos/asf/calcite.git


*** WARNING: tag calcite-1.28.0 was modified! ***

from 18b044d725 (tag)
  to 2326cf8dc9 (commit)
omit dec167ac18 [CALCITE-4835] Release Calcite 1.28.0

This update removed existing revisions from the reference, leaving the
reference pointing at a previous point in the repository history.

 * -- * -- N   refs/tags/calcite-1.28.0 (2326cf8dc9)
\
 O -- O -- O   (18b044d725)

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 README|   2 +-
 site/_docs/history.md | 335 +-
 site/_docs/howto.md   |  16 +--
 3 files changed, 9 insertions(+), 344 deletions(-)



(calcite) tag calcite-1.28.0 updated (2326cf8dc9 -> dec167ac18)

2023-11-13 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to tag calcite-1.28.0
in repository https://gitbox.apache.org/repos/asf/calcite.git


*** WARNING: tag calcite-1.28.0 was modified! ***

from 2326cf8dc9 (commit)
  to dec167ac18 (commit)
from 2326cf8dc9 Bump Guava maximum version up to 31.0.1-jre
 add dec167ac18 [CALCITE-4835] Release Calcite 1.28.0

No new revisions were added by this update.

Summary of changes:
 README|   2 +-
 site/_docs/history.md | 335 +-
 site/_docs/howto.md   |  16 ++-
 3 files changed, 344 insertions(+), 9 deletions(-)



[calcite] branch master updated: Keep backslash when autoformatting <<...\n" +>>

2021-12-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 3456136  Keep backslash when autoformatting <<...\n" +>>
3456136 is described below

commit 345613689899de1ea7915f95260665305e8c0316
Author: Vladimir Sitnikov 
AuthorDate: Wed Dec 8 21:33:34 2021 +0300

Keep backslash when autoformatting <<...\n" +>>

We do not have multiline string literals in Java yet, so
the code convention is that \n should be at the end of the line,
in other words, the newline inside the literal should be paired
with a newline outside of the literal.

Java's Matcher#replaceAll treats \ in the replacement a special way, so
literal \ in the replacement string should be coded as    ¯\_(ツ)_/¯
---
 build.gradle.kts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index 267aa49..cf40a12 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -539,7 +539,7 @@ allprojects {
 indentWithSpaces(2)
 replaceRegex("@Override should not be on its own line", 
"(@Override)\\s{2,}", "\$1 ")
 replaceRegex("@Test should not be on its own line", 
"(@Test)\\s{2,}", "\$1 ")
-replaceRegex("Newline in string should be at end of line", 
"""\\n" *\+""", "\\n\"\n  +")
+replaceRegex("Newline in string should be at end of line", 
"""\\n" *\+""", "n\"\n  +")
 replaceRegex("require message for requireNonNull", 
"""(?

[calcite] branch master updated (fd3c1d0 -> 8373d4c)

2021-12-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from fd3c1d0  [CALCITE-4851] Build gives lots of 'Execution optimizations 
have been disabled' warnings
 add 8373d4c  Use GitHub Action concurrency feature to cancel stale CI 
executions

No new revisions were added by this update.

Summary of changes:
 .github/workflows/buildcache.yml|  7 +++
 .github/workflows/cancel-duplicates.yml | 20 
 .github/workflows/main.yml  |  7 +++
 3 files changed, 14 insertions(+), 20 deletions(-)
 delete mode 100644 .github/workflows/cancel-duplicates.yml


[calcite] branch master updated (f3e2f04 -> 8a266e6)

2021-12-03 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from f3e2f04  Exclude kotlin-stdlib from :core runtime dependencies
 add 8a266e6  Clarify why squash commits option in GitHub PR merge is 
disabled

No new revisions were added by this update.

Summary of changes:
 .asf.yaml | 3 +++
 1 file changed, 3 insertions(+)


[calcite] branch master updated: Exclude kotlin-stdlib from :core runtime dependencies

2021-11-30 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new f3e2f04  Exclude kotlin-stdlib from :core runtime dependencies
f3e2f04 is described below

commit f3e2f041567e35e65464676d3171db3b5f2ddf9c
Author: Vladimir Sitnikov 
AuthorDate: Tue Nov 30 16:00:07 2021 +0300

Exclude kotlin-stdlib from :core runtime dependencies
---
 gradle.properties | 4 
 1 file changed, 4 insertions(+)

diff --git a/gradle.properties b/gradle.properties
index 2a8e9ac..4e08f4d 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -58,6 +58,10 @@ org.jetbrains.gradle.plugin.idea-ext.version=0.5
 org.nosphere.apache.rat.version=0.7.0
 org.owasp.dependencycheck.version=6.1.6
 
+# For now, we use Kotlin for tests only, so we don't want to include 
kotlin-stdlib dependency to the runtimeClasspath
+# See 
https://kotlinlang.org/docs/gradle.html#dependency-on-the-standard-library
+kotlin.stdlib.default.dependency=false
+
 # TODO
 # error_prone_core.version=2.3.3
 # docker-maven-plugin.version=1.2.0


[calcite] branch master updated (a03586c -> 8438754)

2021-11-11 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from a03586c  [CALCITE-4875] Preserve Operand Nullability in NVL rewrite
 add 8438754  [CALCITE-4877] Ignore test for invalid foreign schema class

No new revisions were added by this update.

Summary of changes:
 server/src/test/resources/sql/schema.iq | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


[calcite] branch master updated (7e87833 -> 6d51d27)

2021-11-10 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 7e87833  Bump com.github.vlsi.vlsi-release-plugins to 1.76
 add 6d51d27  Update Gradle to 7.3

No new revisions were added by this update.

Summary of changes:
 gradle/wrapper/gradle-wrapper.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


[calcite] branch master updated (f1db79f -> 7e87833)

2021-11-09 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from f1db79f  [CALCITE-4131] remove the XmlFunctions exception handled by 
System.out
 add 7e87833  Bump com.github.vlsi.vlsi-release-plugins to 1.76

No new revisions were added by this update.

Summary of changes:
 gradle.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[calcite] branch master updated: [CALCITE-4131] remove the XmlFunctions exception handled by System.out

2021-11-07 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new f1db79f  [CALCITE-4131] remove the XmlFunctions exception handled by 
System.out
f1db79f is described below

commit f1db79fb876ac9ba3c405283e99bb0438e4e97be
Author: NobiGo 
AuthorDate: Sat Sep 25 23:05:54 2021 +0800

[CALCITE-4131] remove the XmlFunctions exception handled by System.out
---
 .../org/apache/calcite/runtime/XmlFunctions.java   | 26 +-
 core/src/test/resources/sql/functions.iq   |  7 ++
 gradle.properties  |  2 +-
 3 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.java 
b/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.java
index 13d270f..8c81647 100644
--- a/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.java
+++ b/core/src/main/java/org/apache/calcite/runtime/XmlFunctions.java
@@ -33,6 +33,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+import javax.xml.transform.ErrorListener;
 import javax.xml.transform.OutputKeys;
 import javax.xml.transform.Source;
 import javax.xml.transform.Transformer;
@@ -61,7 +62,11 @@ public class XmlFunctions {
   private static final ThreadLocal<@Nullable XPathFactory> XPATH_FACTORY =
   ThreadLocal.withInitial(XPathFactory::newInstance);
   private static final ThreadLocal<@Nullable TransformerFactory> 
TRANSFORMER_FACTORY =
-  ThreadLocal.withInitial(TransformerFactory::newInstance);
+  ThreadLocal.withInitial(() -> {
+TransformerFactory transformerFactory = 
TransformerFactory.newInstance();
+transformerFactory.setErrorListener(new InternalErrorListener());
+return transformerFactory;
+  });
 
   private static final Pattern VALID_NAMESPACE_PATTERN = Pattern
   .compile("^(([0-9a-zA-Z:_-]+=\"[^\"]*\")( 
[0-9a-zA-Z:_-]+=\"[^\"]*\")*)$");
@@ -107,6 +112,7 @@ public class XmlFunctions {
   .newTransformer(xsltSource);
   final StringWriter writer = new StringWriter();
   final StreamResult result = new StreamResult(writer);
+  transformer.setErrorListener(new InternalErrorListener());
   transformer.transform(xmlSource, result);
   return writer.toString();
 } catch (TransformerConfigurationException e) {
@@ -203,8 +209,26 @@ public class XmlFunctions {
   private static String convertNodeToString(Node node) throws 
TransformerException {
 StringWriter writer = new StringWriter();
 Transformer transformer = 
castNonNull(TRANSFORMER_FACTORY.get()).newTransformer();
+transformer.setErrorListener(new InternalErrorListener());
 transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
 transformer.transform(new DOMSource(node), new StreamResult(writer));
 return writer.toString();
   }
+
+  /** The internal default ErrorListener for Transformer. Just rethrows errors 
to
+   * discontinue the XML transformation. */
+  private static class InternalErrorListener implements ErrorListener {
+
+@Override public void warning(TransformerException exception) throws 
TransformerException {
+  throw exception;
+}
+
+@Override public void error(TransformerException exception) throws 
TransformerException {
+  throw exception;
+}
+
+@Override public void fatalError(TransformerException exception) throws 
TransformerException {
+  throw exception;
+}
+  }
 }
diff --git a/core/src/test/resources/sql/functions.iq 
b/core/src/test/resources/sql/functions.iq
index b3cefad..58770a0 100644
--- a/core/src/test/resources/sql/functions.iq
+++ b/core/src/test/resources/sql/functions.iq
@@ -179,5 +179,12 @@ SELECT EXISTSNODE(
 
 !ok
 
+SELECT XMLTRANSFORM(
+   '<',
+   'http://www.w3.org/1999/XSL/Transform;>
+'
+   );
+Invalid input for XMLTRANSFORM xml: '<'
+!error
 
 # End functions.iq
diff --git a/gradle.properties b/gradle.properties
index 7a3d179..23365ad 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -134,7 +134,7 @@ pig.version=0.16.0
 pigunit.version=0.16.0
 postgresql.version=9.3-1102-jdbc41
 protobuf.version=3.17.1
-quidem.version=0.9
+quidem.version=0.10
 scala-library.version=2.10.3
 scott-data-hsqldb.version=0.1
 servlet.version=4.0.1


[calcite-avatica] branch master updated (57c254f -> 434cf00)

2021-11-07 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git.


from 57c254f  [CALCITE-4840] Make README easier to scan
 add 434cf00  [CALCITE-4877] Make the exception information more explicit 
for instantiate plugin.

No new revisions were added by this update.

Summary of changes:
 .../org/apache/calcite/avatica/AvaticaUtils.java   | 46 ++---
 .../calcite/avatica/test/AvaticaUtilsTest.java | 48 ++
 2 files changed, 71 insertions(+), 23 deletions(-)


[calcite] branch master updated: Bump JDK from 15 to 17 in seed build cache CI jobs

2021-10-06 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new dff775d  Bump JDK from 15 to 17 in seed build cache CI jobs
dff775d is described below

commit dff775d24ae6f8b2e0f3b68fd727ef16fc9cb428
Author: Vladimir Sitnikov 
AuthorDate: Wed Oct 6 14:59:42 2021 +0300

Bump JDK from 15 to 17 in seed build cache CI jobs
---
 .github/workflows/buildcache.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/buildcache.yml b/.github/workflows/buildcache.yml
index 198610a..7737077 100644
--- a/.github/workflows/buildcache.yml
+++ b/.github/workflows/buildcache.yml
@@ -13,7 +13,7 @@ jobs:
   fail-fast: false
   matrix:
 os: [ubuntu, macos, windows]
-jdk: [8, 11, 15]
+jdk: [8, 11, 17]
 
 name: '${{ matrix.os }}, ${{ matrix.jdk }} seed build cache'
 runs-on: ${{ matrix.os }}-latest


[calcite] branch master updated: Use jdk16 instead of jdk17 since jdk17 is not yet available at AppVeyor

2021-10-05 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 07b68bc  Use jdk16 instead of jdk17 since jdk17 is not yet available 
at AppVeyor
07b68bc is described below

commit 07b68bcb3a3ef58c98651bd6b7df8e56f7dd3976
Author: Vladimir Sitnikov 
AuthorDate: Tue Oct 5 13:35:25 2021 +0300

Use jdk16 instead of jdk17 since jdk17 is not yet available at AppVeyor
---
 appveyor.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/appveyor.yml b/appveyor.yml
index bf15cbc..492090d 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -39,7 +39,7 @@ matrix:
 environment:
   matrix:
 - JAVA_HOME: C:\Program Files\Java\jdk1.8.0
-- JAVA_HOME: C:\Program Files\Java\jdk17
+- JAVA_HOME: C:\Program Files\Java\jdk16
 build_script:
   - ./gradlew assemble javadoc
 test_script:


[calcite] branch master updated: Fix string reference to HrSchema in MaterializationTest with HrSchema.class.getName()

2021-10-05 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 21cbdf8  Fix string reference to HrSchema in MaterializationTest with 
HrSchema.class.getName()
21cbdf8 is described below

commit 21cbdf82b98130d1a8a6b9ff56a5dfd2cbfb025a
Author: Vladimir Sitnikov 
AuthorDate: Tue Oct 5 13:31:49 2021 +0300

Fix string reference to HrSchema in MaterializationTest with 
HrSchema.class.getName()
---
 core/src/test/java/org/apache/calcite/test/MaterializationTest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/core/src/test/java/org/apache/calcite/test/MaterializationTest.java 
b/core/src/test/java/org/apache/calcite/test/MaterializationTest.java
index 48a2f71..9e4aad3 100644
--- a/core/src/test/java/org/apache/calcite/test/MaterializationTest.java
+++ b/core/src/test/java/org/apache/calcite/test/MaterializationTest.java
@@ -33,6 +33,7 @@ import org.apache.calcite.test.schemata.hr.DepartmentPlus;
 import org.apache.calcite.test.schemata.hr.Dependent;
 import org.apache.calcite.test.schemata.hr.Employee;
 import org.apache.calcite.test.schemata.hr.Event;
+import org.apache.calcite.test.schemata.hr.HrSchema;
 import org.apache.calcite.test.schemata.hr.Location;
 import org.apache.calcite.util.JsonBuilder;
 import org.apache.calcite.util.Smalls;
@@ -220,7 +221,7 @@ public class MaterializationTest {
   + "  name: 'hr',\n"
   + "  factory: 
'org.apache.calcite.adapter.java.ReflectiveSchema$Factory',\n"
   + "  operand: {\n"
-  + "class: 'org.apache.calcite.test.JdbcTest$HrSchema'\n"
+  + "class: '" + HrSchema.class.getName() + "'\n"
   + "  }\n"
   + "}\n"
   + "  ]\n"


[calcite] branch master updated (511eecd -> a8a6569)

2021-10-05 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 511eecd  [CALCITE-4787] Replace ImmutableBeans with Immutables in core 
module
 add b4d7d48  Bump JUnit5 to 5.8.1
 add 49c1a6d  Skip EqualsHashCode verification in ErrorProne: it is already 
verified with Checkstyle
 add 2fdc537  [CALCITE-4823] Suppress warnings for 
java.security.AccessController deprecation
 add ef40b52  [CALCITE-4821] Move utility test classes into calcite-testkit 
and unpublish -test.jar
 add a8a8a6b  Add missing @Override annotations
 add 1667b51  Fix ErrorProne violations in testkit
 add a8a6569  [CALCITE-4829] Bump Gradle to 7.2 and test with Java 17 at 
GitHub Actions

No new revisions were added by this update.

Summary of changes:
 .github/workflows/main.yml |   8 +-
 appveyor.yml   |   2 +-
 babel/build.gradle.kts |   2 +-
 bom/build.gradle.kts   |   6 +-
 build.gradle.kts   |  19 +-
 buildSrc/build.gradle.kts  |   6 -
 buildSrc/gradle.properties |   1 -
 cassandra/build.gradle.kts |   2 +-
 core/build.gradle.kts  |  24 +-
 .../calcite/config/CalciteSystemProperty.java  |   7 +-
 .../java/org/apache/calcite/runtime/Resources.java |   4 +-
 .../org/apache/calcite/util/SaffronProperties.java |   7 +-
 .../calcite/jdbc/CalciteRemoteDriverTest.java  |   6 +-
 .../org/apache/calcite/plan/RelWriterTest.java |  12 +-
 .../calcite/rel/rules/DateRangeRulesTest.java  |   2 +-
 .../calcite/sql/parser/CoreSqlParserTest.java} |   6 +-
 .../org/apache/calcite/test/CoreQuidemTest.java|  21 +
 .../apache/calcite/test/ExtensionDdlExecutor.java  |   2 +-
 .../org/apache/calcite/test/JdbcAdapterTest.java   |  43 ++-
 .../apache/calcite/test/JdbcFrontLinqBackTest.java |  39 +-
 .../java/org/apache/calcite/test/JdbcTest.java | 428 ++---
 .../java/org/apache/calcite/test/LatticeTest.java  |   8 +-
 .../apache/calcite/test/MaterializationTest.java   |  12 +-
 .../calcite/test/MultiJdbcSchemaJoinTest.java  |   3 +-
 .../apache/calcite/test/ReflectiveSchemaTest.java  | 205 +-
 .../org/apache/calcite/test/RelBuilderTest.java|   3 +-
 .../calcite/test/RexImplicationCheckerTest.java| 212 +-
 .../apache/calcite/test/SqlAdvisorJdbcTest.java|   3 +-
 .../java/org/apache/calcite/test/StreamTest.java   | 271 +
 .../test/java/org/apache/calcite/test/UdfTest.java |   5 +-
 .../EnumerableBatchNestedLoopJoinTest.java |  27 +-
 .../test/enumerable/EnumerableCalcTest.java|   6 +-
 .../test/enumerable/EnumerableCorrelateTest.java   |  20 +-
 .../test/enumerable/EnumerableHashJoinTest.java|  18 +-
 .../test/enumerable/EnumerableJoinTest.java|  16 +-
 .../test/enumerable/EnumerableMergeUnionTest.java  |  26 +-
 .../EnumerableRepeatUnionHierarchyTest.java|   2 +-
 .../enumerable/EnumerableSortedAggregateTest.java  |  12 +-
 .../enumerable/EnumerableStringComparisonTest.java |   4 +-
 .../java/org/apache/calcite/tools/PlannerTest.java |   1 +
 druid/build.gradle.kts |   2 +-
 .../calcite/test/DruidDateRangeRulesTest.java  |   2 +-
 elasticsearch/build.gradle.kts |   2 +-
 example/csv/build.gradle.kts   |   5 +-
 file/build.gradle.kts  |   2 +-
 geode/build.gradle.kts |   2 +-
 gradle.properties  |   6 +-
 gradle/wrapper/gradle-wrapper.properties   |   4 +-
 innodb/build.gradle.kts|   2 +-
 kafka/build.gradle.kts |   2 +-
 mongodb/build.gradle.kts   |   2 +-
 pig/build.gradle.kts   |   2 +-
 piglet/build.gradle.kts|   2 +-
 .../org/apache/calcite/test/PigRelBuilderTest.java |  13 +-
 plus/build.gradle.kts  |   2 +-
 .../org/apache/calcite/adapter/tpch/TpchTest.java  |   1 -
 redis/build.gradle.kts |   2 +-
 server/build.gradle.kts|   2 +-
 settings.gradle.kts|   1 +
 spark/build.gradle.kts |   2 +-
 splunk/build.gradle.kts|   2 +-
 .../org/apache/calcite/test/SplunkAdapterTest.java |   3 +-
 src/main/config/checkstyle/suppressions.xml|   6 +
 {redis => testkit}/build.gradle.kts|  29 +-
 .../apache/calcite/sql/parser/SqlParserTest.java   |  37 +-
 .../apache/calcite/sql/parser/package-info.java|   2 +-
 .../apache/calcite/sql/t

[calcite-avatica] branch master updated: [CALCITE-4815] Enforce shaded artifacts include checker-qual 3.10.0 or later

2021-10-01 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git


The following commit(s) were added to refs/heads/master by this push:
 new 951b21e  [CALCITE-4815] Enforce shaded artifacts include checker-qual 
3.10.0 or later
951b21e is described below

commit 951b21ef7ce075a414559d7192739463b40f7b9b
Author: Vladimir Sitnikov 
AuthorDate: Fri Oct 1 09:53:27 2021 +0300

[CALCITE-4815] Enforce shaded artifacts include checker-qual 3.10.0 or later

checker-qual has MIT license, so it requires to include the license text 
when redistributing checker-qual.
checker-qual before 3.0.0 did not include the license file as a part of the 
jar, so we enforce the newer version.
---
 bom/build.gradle.kts | 1 +
 gradle.properties| 1 +
 2 files changed, 2 insertions(+)

diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts
index 71a8183..acbb024 100644
--- a/bom/build.gradle.kts
+++ b/bom/build.gradle.kts
@@ -45,6 +45,7 @@ dependencies {
 // In other words, marking dependency as "runtime" would avoid 
accidental
 // dependency on it during compilation
 apiv("com.beust:jcommander")
+apiv("org.checkerframework:checker-qual", "checkerframework")
 apiv("com.fasterxml.jackson.core:jackson-annotations", "jackson")
 apiv("com.fasterxml.jackson.core:jackson-core", "jackson")
 apiv("com.fasterxml.jackson.core:jackson-databind", "jackson")
diff --git a/gradle.properties b/gradle.properties
index 5d752f4..24fcdde 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -49,6 +49,7 @@ org.owasp.dependencycheck.version=5.2.2
 # docker-maven-plugin.version=1.2.0
 
 # Tools
+checkerframework.version=3.10.0
 checkstyle.version=6.18
 spotbugs.version=3.1.11
 # For Checkstyle


[calcite] branch master updated: [CALCITE-4790] Make Gradle pass the 'user.timezone' property to the test JVM (Alessandro Solimando)

2021-09-28 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new d6a2d69  [CALCITE-4790] Make Gradle pass the 'user.timezone' property 
to the test JVM (Alessandro Solimando)
d6a2d69 is described below

commit d6a2d69d33c466f7cb7d164f3db4e54771d31371
Author: Alessandro Solimando 
AuthorDate: Wed Sep 22 20:19:02 2021 +0200

[CALCITE-4790] Make Gradle pass the 'user.timezone' property to the test 
JVM (Alessandro Solimando)
---
 build.gradle.kts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/build.gradle.kts b/build.gradle.kts
index 138a391..af8cc78 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -718,6 +718,7 @@ allprojects {
 passProperty("junit.jupiter.execution.timeout.default", "5 m")
 passProperty("user.language", "TR")
 passProperty("user.country", "tr")
+passProperty("user.timezone", "UTC")
 val props = System.getProperties()
 for (e in props.propertyNames() as 
`java.util`.Enumeration) {
 if (e.startsWith("calcite.") || e.startsWith("avatica.")) {


[calcite] branch master updated: Remove System.out.println from DiffRepository

2021-05-06 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 0d1e7a8  Remove System.out.println from DiffRepository
0d1e7a8 is described below

commit 0d1e7a8745a88e308f872d3450a333b319ffeea7
Author: Vladimir Sitnikov 
AuthorDate: Thu May 6 10:55:18 2021 +0300

Remove System.out.println from DiffRepository
---
 core/src/test/java/org/apache/calcite/test/DiffRepository.java | 1 -
 1 file changed, 1 deletion(-)

diff --git a/core/src/test/java/org/apache/calcite/test/DiffRepository.java 
b/core/src/test/java/org/apache/calcite/test/DiffRepository.java
index b1c010b..7432214 100644
--- a/core/src/test/java/org/apache/calcite/test/DiffRepository.java
+++ b/core/src/test/java/org/apache/calcite/test/DiffRepository.java
@@ -549,7 +549,6 @@ public class DiffRepository {
   try (Writer w = Util.printWriter(logFile)) {
 write(doc, w, indent);
   }
-  System.out.println("write; modCount=" + modCount);
 } catch (IOException e) {
   throw Util.throwAsRuntime("error while writing test reference log '"
   + logFile + "'", e);


[calcite] branch master updated (7f65cf2 -> 4bc9166)

2021-03-24 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


omit 7f65cf2  Repalce testRuntime with runtimeElements and 
testRuntimeClasspath for Gradle 7 compatibility

This update removed existing revisions from the reference, leaving the
reference pointing at a previous point in the repository history.

 * -- * -- N   refs/heads/master (4bc9166)
\
 O -- O -- O   (7f65cf2)

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 build.gradle.kts | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)


[calcite] branch master updated (7bb23ed -> 7f65cf2)

2021-03-24 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


omit 7bb23ed  Remove use of testRuntime from the build script
 new 7f65cf2  Repalce testRuntime with runtimeElements and 
testRuntimeClasspath for Gradle 7 compatibility

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (7bb23ed)
\
 N -- N -- N   refs/heads/master (7f65cf2)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.gradle.kts |  2 ++
 .../test/java/org/apache/calcite/test/JdbcTest.java  | 20 
 2 files changed, 2 insertions(+), 20 deletions(-)


[calcite] 01/01: Repalce testRuntime with runtimeElements and testRuntimeClasspath for Gradle 7 compatibility

2021-03-24 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit 7f65cf2bfe2acd8d86773651527e2371492422db
Author: Vladimir Sitnikov 
AuthorDate: Wed Mar 24 10:12:17 2021 +0300

Repalce testRuntime with runtimeElements and testRuntimeClasspath for 
Gradle 7 compatibility
---
 build.gradle.kts | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index 138a391..a0d2ca6 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -790,7 +790,10 @@ allprojects {
 }
 
 val testClasses by configurations.creating {
-extendsFrom(configurations["testRuntime"])
+isCanBeConsumed = true
+isCanBeResolved = false
+extendsFrom(configurations["runtimeElements"])
+extendsFrom(configurations["testRuntimeClasspath"])
 }
 
 val archives by configurations.getting


[calcite] branch master updated: Remove use of testRuntime from the build script

2021-03-24 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 7bb23ed  Remove use of testRuntime from the build script
7bb23ed is described below

commit 7bb23ed592c06c9ccdf30f5cc099c355aa995eb1
Author: Vladimir Sitnikov 
AuthorDate: Wed Mar 24 10:12:17 2021 +0300

Remove use of testRuntime from the build script
---
 build.gradle.kts |  3 ++-
 .../test/java/org/apache/calcite/test/JdbcTest.java  | 20 
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index 138a391..1550aa9 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -790,7 +790,8 @@ allprojects {
 }
 
 val testClasses by configurations.creating {
-extendsFrom(configurations["testRuntime"])
+isCanBeConsumed = true
+isCanBeResolved = false
 }
 
 val archives by configurations.getting
diff --git a/core/src/test/java/org/apache/calcite/test/JdbcTest.java 
b/core/src/test/java/org/apache/calcite/test/JdbcTest.java
index 45b0ab0..839342a 100644
--- a/core/src/test/java/org/apache/calcite/test/JdbcTest.java
+++ b/core/src/test/java/org/apache/calcite/test/JdbcTest.java
@@ -3388,6 +3388,26 @@ public class JdbcTest {
 + "empid=200; deptno=20; name=Eric; salary=8000.0; 
commission=500\n");
   }
 
+  @Test void testLimitStar2() throws Exception {
+CalciteAssert.hr()
+.doWithConnection(c -> {
+  try {
+PreparedStatement ps = c.prepareStatement("select * from 
\"hr\".\"emps\"\n"
++ "limit ?");
+ps.setLong(1, 1L << 32);
+ResultSet resultSet = ps.executeQuery();
+System.out.println("resultSet = " + resultSet.next());
+  } catch (SQLException throwables) {
+throwables.printStackTrace();
+  }
+});
+//.returns(""
+//+ "empid=100; deptno=10; name=Bill; salary=1.0; 
commission=1000\n"
+//+ "empid=200; deptno=20; name=Eric; salary=8000.0; 
commission=500\n"
+//+ "empid=150; deptno=10; name=Sebastian; salary=7000.0; 
commission=null\n"
+//+ "empid=110; deptno=10; name=Theodore; salary=11500.0; 
commission=250\n");
+  }
+
   /** Limit implemented using {@link Queryable#take}. Test case for
* https://issues.apache.org/jira/browse/CALCITE-96;>[CALCITE-96]
* LIMIT against a table in a clone schema causes


[calcite] branch master updated (084d608 -> 4bc9166)

2021-03-17 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 084d608  [CALCITE-4477] In Interpreter, support table-valued functions
 add 4bc9166  Add Matcher#matches to ForbiddenApis to avoid its accidental 
use

No new revisions were added by this update.

Summary of changes:
 build.gradle.kts   |  4 ++-
 .../materialize/NormalizationTrimFieldTest.java|  3 +-
 .../calcite/test/AbstractMaterializedViewTest.java |  4 ++-
 .../java/org/apache/calcite/test/Matchers.java |  2 +-
 .../test/{CalciteResourceTest.java => Unsafe.java} | 36 +++---
 .../java/org/apache/calcite/util/UtilTest.java | 26 
 example/function/build.gradle.kts  |  5 ---
 src/main/config/forbidden-apis/signatures.txt  |  3 ++
 8 files changed, 41 insertions(+), 42 deletions(-)
 copy core/src/test/java/org/apache/calcite/test/{CalciteResourceTest.java => 
Unsafe.java} (52%)



[calcite] 01/02: Apply com.autonomousapps.dependency-analysis plugin only when -PenableDependencyAnalysis is provided on a command line

2021-03-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit 0378a560cc558698b928c9ebc088b905bd2d14c8
Author: Vladimir Sitnikov 
AuthorDate: Mon Mar 8 22:21:31 2021 +0300

Apply com.autonomousapps.dependency-analysis plugin only when 
-PenableDependencyAnalysis is provided on a command line

The plugin is not 100% accurate yet, and it seems to cause "sourcesJar not 
executed as a part of assemble task"

See 
https://github.com/apache/calcite/commit/b49693d31964657bf5058bd9387e505992cebd51
---
 build.gradle.kts | 30 +-
 1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index 5934ebb..d2f5e84 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -54,7 +54,7 @@ plugins {
 id("com.github.vlsi.gradle-extensions")
 id("com.github.vlsi.license-gather") apply false
 id("com.github.vlsi.stage-vote-release")
-id("com.autonomousapps.dependency-analysis")
+id("com.autonomousapps.dependency-analysis") apply false
 }
 
 repositories {
@@ -70,6 +70,7 @@ val lastEditYear by extra(lastEditYear())
 val enableSpotBugs = props.bool("spotbugs")
 val enableCheckerframework by props()
 val enableErrorprone by props()
+val enableDependencyAnalysis by props()
 val skipJandex by props()
 val skipCheckstyle by props()
 val skipAutostyle by props()
@@ -234,18 +235,21 @@ val buildSqllineClasspath by 
tasks.registering(Jar::class) {
 }
 }
 
-dependencyAnalysis {
-// See 
https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin
-// Most of the time the recommendations are good, however, there are cases 
the suggestsions
-// are off, so we don't include the dependency analysis to CI workflow yet
-// ./gradlew buildHealth --no-parallel --no-daemon
-issues {
-all { // all projects
-onAny {
-severity("fail")
-}
-onRedundantPlugins {
-severity("ignore")
+if (enableDependencyAnalysis) {
+apply(plugin = "com.autonomousapps.dependency-analysis")
+configure {
+// See 
https://github.com/autonomousapps/dependency-analysis-android-gradle-plugin
+// Most of the time the recommendations are good, however, there are 
cases the suggestsions
+// are off, so we don't include the dependency analysis to CI workflow 
yet
+// ./gradlew -PenableDependencyAnalysis buildHealth --no-parallel 
--no-daemon
+issues {
+all { // all projects
+onAny {
+severity("fail")
+}
+onRedundantPlugins {
+severity("ignore")
+}
 }
 }
 }



[calcite] 02/02: Bump Gradle 6.8.1 -> 6.8.3

2021-03-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit b61f3ca7ac42c9f0f6ec4d35748bba70f63a4b0c
Author: Vladimir Sitnikov 
AuthorDate: Mon Mar 8 22:23:56 2021 +0300

Bump Gradle 6.8.1 -> 6.8.3
---
 gradle/wrapper/gradle-wrapper.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gradle/wrapper/gradle-wrapper.properties 
b/gradle/wrapper/gradle-wrapper.properties
index 1b6b616..f2aae39 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -16,7 +16,7 @@
 #
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionSha256Sum=fd591a34af7385730970399f473afabdb8b28d57fd97d6625c388d090039d6fd
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
+distributionSha256Sum=7faa7198769f872826c8ef4f1450f839ec27f0b4d5d1e51bade63667cbccd205
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists



[calcite] branch master updated (b49693d -> b61f3ca)

2021-03-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from b49693d  Update dependency declarations: adjust api vs implementation, 
remove unused ones
 new 0378a56  Apply com.autonomousapps.dependency-analysis plugin only when 
-PenableDependencyAnalysis is provided on a command line
 new b61f3ca  Bump Gradle 6.8.1 -> 6.8.3

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.gradle.kts | 30 +-
 gradle/wrapper/gradle-wrapper.properties |  4 ++--
 2 files changed, 19 insertions(+), 15 deletions(-)



[calcite] branch master updated (0fb14d5 -> b49693d)

2021-03-05 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 0fb14d5  [CALCITE-4276] MaterializedViewOnlyAggregateRule performs 
invalid rewrite on query that contains join and time-rollup function (FLOOR) 
(Justin Swett)
 add b49693d  Update dependency declarations: adjust api vs implementation, 
remove unused ones

No new revisions were added by this update.

Summary of changes:
 babel/build.gradle.kts|  3 +--
 build.gradle.kts  | 18 ++
 cassandra/build.gradle.kts|  7 ---
 core/build.gradle.kts | 11 ++-
 druid/build.gradle.kts| 10 +-
 elasticsearch/build.gradle.kts|  9 +
 example/csv/build.gradle.kts  |  4 +---
 example/function/build.gradle.kts |  1 +
 file/build.gradle.kts |  3 +++
 geode/build.gradle.kts|  5 +++--
 gradle.properties |  1 +
 innodb/build.gradle.kts   |  5 +++--
 kafka/build.gradle.kts|  3 ++-
 linq4j/build.gradle.kts   |  2 +-
 mongodb/build.gradle.kts  |  4 ++--
 pig/build.gradle.kts  |  3 +--
 piglet/build.gradle.kts   |  4 ++--
 plus/build.gradle.kts |  6 +++---
 redis/build.gradle.kts|  4 +---
 server/build.gradle.kts   |  2 +-
 settings.gradle.kts   |  1 +
 spark/build.gradle.kts|  2 +-
 splunk/build.gradle.kts   |  6 +++---
 23 files changed, 69 insertions(+), 45 deletions(-)



[calcite] branch master updated (207bc8a -> 03e356c)

2021-02-23 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 207bc8a  [CALCITE-4265] Improve error message when CAST to unknown 
type (Louis Kuang)
 add 48d7702  Bump checkerframework 3.9.1 -> 3.10.0, errorprone 2.4.0 -> 
2.5.1
 add 03e356c  Cleanup code after errorprone upgrade: IdentityHashMapUsage, 
JdkObsolete -> JavaUtilDate

No new revisions were added by this update.

Summary of changes:
 build.gradle.kts  | 1 +
 .../calcite/adapter/enumerable/EnumerableRelImplementor.java  | 2 +-
 core/src/main/java/org/apache/calcite/materialize/Lattice.java| 2 +-
 .../java/org/apache/calcite/materialize/LatticeSuggester.java | 2 +-
 .../java/org/apache/calcite/rel/externalize/RelJsonWriter.java| 2 +-
 .../main/java/org/apache/calcite/rel/logical/LogicalWindow.java   | 2 +-
 .../calcite/rel/rules/AggregateExpandWithinDistinctRule.java  | 2 +-
 .../org/apache/calcite/rel/rules/AggregateUnionTransposeRule.java | 3 +--
 .../main/java/org/apache/calcite/rel/rules/PruneEmptyRules.java   | 2 +-
 core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java   | 2 +-
 .../main/java/org/apache/calcite/sql/SqlIntervalQualifier.java| 3 +--
 .../java/org/apache/calcite/sql/validate/AbstractNamespace.java   | 2 +-
 .../java/org/apache/calcite/sql/validate/SqlValidatorImpl.java| 8 
 .../main/java/org/apache/calcite/util/PartiallyOrderedSet.java| 3 ++-
 core/src/main/java/org/apache/calcite/util/Util.java  | 4 ++--
 .../org/apache/calcite/adapter/druid/DruidConnectionImpl.java | 4 ++--
 .../calcite/adapter/elasticsearch/ElasticsearchEnumerators.java   | 2 +-
 .../main/java/org/apache/calcite/adapter/file/CsvEnumerator.java  | 2 +-
 .../java/org/apache/calcite/adapter/file/FileRowConverter.java| 2 +-
 .../java/org/apache/calcite/adapter/geode/util/GeodeUtils.java| 2 +-
 gradle.properties | 8 
 .../main/java/org/apache/calcite/linq4j/tree/BlockBuilder.java| 8 
 .../apache/calcite/linq4j/tree/DeterministicCodeOptimizer.java| 2 +-
 .../java/org/apache/calcite/adapter/mongodb/MongoEnumerator.java  | 2 +-
 24 files changed, 36 insertions(+), 36 deletions(-)



[calcite] branch master updated: Make sure FmppTask re-executes in case default_config.fmpp changes

2021-02-05 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 99aa01a  Make sure FmppTask re-executes in case default_config.fmpp 
changes
99aa01a is described below

commit 99aa01a215587a6121f5d0e4dc4c698eb6db6598
Author: Vladimir Sitnikov 
AuthorDate: Sat Feb 6 01:53:53 2021 +0300

Make sure FmppTask re-executes in case default_config.fmpp changes
---
 .../main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt   | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/buildSrc/subprojects/fmpp/src/main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt
 
b/buildSrc/subprojects/fmpp/src/main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt
index f591d7e..2f3ed17 100644
--- 
a/buildSrc/subprojects/fmpp/src/main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt
+++ 
b/buildSrc/subprojects/fmpp/src/main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt
@@ -48,6 +48,11 @@ open class FmppTask @Inject constructor(
 @PathSensitive(PathSensitivity.RELATIVE)
 val templates = objectFactory.directoryProperty()
 
+@InputFile
+@PathSensitive(PathSensitivity.NONE)
+val defaultConfig = objectFactory.fileProperty()
+.convention(templates.file("../default_config.fmpp"))
+
 @OutputDirectory
 val output = objectFactory.directoryProperty()
 .convention(project.layout.buildDirectory.dir("fmpp/$name"))
@@ -72,8 +77,8 @@ open class FmppTask @Inject constructor(
 "configuration" to config.get(),
 "sourceRoot" to templates.get().asFile,
 "outputRoot" to output.get().asFile,
-"data" to "tdd(" + config.get().toString().tddString() + "), " 
+
-"default: tdd(" + 
"${templates.get().asFile}/../default_config.fmpp".tddString() + ")"
+"data" to "tdd(${config.get().toString().tddString()}), " +
+"default: 
tdd(${defaultConfig.get().toString().tddString()})"
 )
 }
 }



[calcite] branch master updated: Use max-parallel=3 to reduce the usage of the shared GitHub Actions executors

2021-02-04 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new c475124  Use max-parallel=3 to reduce the usage of the shared GitHub 
Actions executors
c475124 is described below

commit c475124ef8c61eb398ee119f27dfe21a14eca32f
Author: Vladimir Sitnikov 
AuthorDate: Thu Feb 4 16:26:05 2021 +0300

Use max-parallel=3 to reduce the usage of the shared GitHub Actions 
executors
---
 .github/workflows/buildcache.yml | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/buildcache.yml b/.github/workflows/buildcache.yml
index bcfae54..198610a 100644
--- a/.github/workflows/buildcache.yml
+++ b/.github/workflows/buildcache.yml
@@ -6,8 +6,11 @@ on:
   - master
 
 jobs:
-  ubuntu-code-style:
+  seed-build-cache:
 strategy:
+  # CI resources are shared, so reduce concurrent builds
+  max-parallel: 3
+  fail-fast: false
   matrix:
 os: [ubuntu, macos, windows]
 jdk: [8, 11, 15]



[calcite] branch master updated (126aa84 -> 56bc468)

2021-02-04 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 126aa84  Use Sonatype OSSRH repository instead of JCenter in build 
plugins
 add 56bc468  [CALCITE-4140] Use Wasabi S3 for remote build cache

No new revisions were added by this update.

Summary of changes:
 .github/workflows/buildcache.yml | 33 +
 .github/workflows/main.yml   | 36 
 gradle.properties|  2 ++
 settings.gradle.kts  | 14 ++
 4 files changed, 85 insertions(+)
 create mode 100644 .github/workflows/buildcache.yml



[calcite] branch master updated (85f939f -> 126aa84)

2021-02-03 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 85f939f  [CALCITE-4482] Extract the default SqlWriterConfig in 
SqlPrettyWriter, reduce the overhead of "ImmutableBeans.create" (Jiatao Tao)
 add 126aa84  Use Sonatype OSSRH repository instead of JCenter in build 
plugins

No new revisions were added by this update.

Summary of changes:
 buildSrc/build.gradle.kts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



[calcite] branch master updated (6dace36 -> 12a484a)

2021-01-25 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 6dace36  Bump checkerframework 3.7 -> 3.9.1
 add 12a484a  [CALCITE-4431] Use requireNonNull(var, "var") instead of 
requireNonNull(var) for better error messages

No new revisions were added by this update.

Summary of changes:
 build.gradle.kts   |  1 +
 .../adapter/enumerable/RexToLixTranslator.java | 10 +++---
 .../calcite/adapter/jdbc/JdbcCatalogSchema.java|  6 ++--
 .../org/apache/calcite/adapter/jdbc/JdbcTable.java |  6 ++--
 .../apache/calcite/adapter/jdbc/JdbcTableScan.java |  2 +-
 .../main/java/org/apache/calcite/config/Lex.java   |  6 ++--
 .../org/apache/calcite/interpreter/Bindables.java  |  4 +--
 .../apache/calcite/interpreter/Interpreter.java|  4 +--
 .../apache/calcite/jdbc/CalciteConnectionImpl.java |  4 +--
 .../org/apache/calcite/jdbc/CalciteMetaImpl.java   |  4 +--
 .../org/apache/calcite/jdbc/CalciteSchema.java | 22 ++---
 .../org/apache/calcite/jdbc/JavaRecordType.java|  2 +-
 .../apache/calcite/jdbc/JavaTypeFactoryImpl.java   |  6 ++--
 .../org/apache/calcite/materialize/Lattice.java| 18 +-
 .../apache/calcite/materialize/LatticeSpace.java   |  2 +-
 .../calcite/materialize/LatticeSuggester.java  |  4 +--
 .../apache/calcite/materialize/LatticeTable.java   |  2 +-
 .../calcite/materialize/MaterializationActor.java  |  2 +-
 .../apache/calcite/materialize/MutableNode.java|  2 +-
 .../ProfilerLatticeStatisticProvider.java  |  2 +-
 .../materialize/SqlLatticeStatisticProvider.java   |  2 +-
 .../java/org/apache/calcite/materialize/Step.java  |  4 +--
 .../apache/calcite/plan/AbstractRelOptPlanner.java |  2 +-
 .../java/org/apache/calcite/plan/Contexts.java |  4 +--
 .../org/apache/calcite/plan/RelCompositeTrait.java |  2 +-
 .../org/apache/calcite/plan/RelOptCluster.java |  6 ++--
 .../apache/calcite/plan/RelOptMaterialization.java |  2 +-
 .../apache/calcite/plan/RelOptPredicateList.java   |  8 ++---
 .../java/org/apache/calcite/plan/RelOptRule.java   |  4 +--
 .../org/apache/calcite/plan/RelOptRuleOperand.java |  2 +-
 .../main/java/org/apache/calcite/plan/RelRule.java | 14 
 .../apache/calcite/plan/RexImplicationChecker.java |  6 ++--
 .../apache/calcite/plan/SubstitutionVisitor.java   |  8 ++---
 .../apache/calcite/plan/hep/HepProgramBuilder.java |  2 +-
 .../calcite/prepare/CalciteCatalogReader.java  |  4 +--
 .../java/org/apache/calcite/prepare/Prepare.java   |  8 ++---
 .../apache/calcite/prepare/RelOptTableImpl.java|  2 +-
 .../org/apache/calcite/rel/RelDistributions.java   |  2 +-
 .../org/apache/calcite/rel/RelFieldCollation.java  |  4 +--
 .../main/java/org/apache/calcite/rel/RelRoot.java  |  2 +-
 .../org/apache/calcite/rel/core/Aggregate.java |  2 +-
 .../org/apache/calcite/rel/core/AggregateCall.java |  6 ++--
 .../org/apache/calcite/rel/core/Correlate.java |  6 ++--
 .../java/org/apache/calcite/rel/core/EquiJoin.java |  4 +--
 .../java/org/apache/calcite/rel/core/Exchange.java |  2 +-
 .../java/org/apache/calcite/rel/core/Join.java |  4 +--
 .../java/org/apache/calcite/rel/core/JoinInfo.java |  6 ++--
 .../java/org/apache/calcite/rel/core/Match.java| 10 +++---
 .../org/apache/calcite/rel/core/RelFactories.java  | 32 +-
 .../java/org/apache/calcite/rel/core/Snapshot.java |  2 +-
 .../java/org/apache/calcite/rel/core/Sort.java |  2 +-
 .../org/apache/calcite/rel/core/SortExchange.java  |  2 +-
 .../java/org/apache/calcite/rel/core/Spool.java|  4 +--
 .../org/apache/calcite/rel/core/TableModify.java   |  6 ++--
 .../org/apache/calcite/rel/core/TableSpool.java|  2 +-
 .../java/org/apache/calcite/rel/core/Window.java   |  8 ++---
 .../org/apache/calcite/rel/hint/HintStrategy.java  |  4 +--
 .../apache/calcite/rel/hint/HintStrategyTable.java |  8 ++---
 .../java/org/apache/calcite/rel/hint/Hintable.java |  2 +-
 .../java/org/apache/calcite/rel/hint/RelHint.java  | 18 +-
 .../apache/calcite/rel/logical/LogicalFilter.java  |  2 +-
 .../apache/calcite/rel/logical/LogicalJoin.java|  2 +-
 .../rel/metadata/CachingRelMetadataProvider.java   |  2 +-
 .../metadata/ReflectiveRelMetadataProvider.java|  2 +-
 .../calcite/rel/metadata/RelMetadataQuery.java |  2 +-
 .../org/apache/calcite/rel/mutable/MutableRel.java |  6 ++--
 .../calcite/rel/rel2sql/RelToSqlConverter.java |  4 +--
 .../apache/calcite/rel/rel2sql/SqlImplementor.java |  8 ++---
 .../rel/rules/AggregateReduceFunctionsRule.java|  2 +-
 .../apache/calcite/rel/rules/DateRangeRules.java   |  8 ++---
 .../org/apache/calcite/rel/rules/LoptJoinTree.java |  4 +--
 .../rel/rules/MultiJoinOptimizeBushyRule.java  |  2 +-
 .../apache/calcite/rel/rules/PushProjector.java|  2 +-
 .../calcite/rel/type/RelDataTypeFactory.java   |  2 +-
 ..

[calcite] branch master updated (2bb9227 -> 6dace36)

2021-01-25 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 2bb9227  Bump Gradle 6.7 -> 6.8.1
 add 6dace36  Bump checkerframework 3.7 -> 3.9.1

No new revisions were added by this update.

Summary of changes:
 .../java/org/apache/calcite/config/CalciteSystemProperty.java  |  2 +-
 .../apache/calcite/sql/type/CompositeOperandTypeChecker.java   | 10 +++---
 gradle.properties  |  4 ++--
 src/main/config/checkerframework/guava/Iterables.astub |  2 +-
 4 files changed, 11 insertions(+), 7 deletions(-)



[calcite] branch master updated (801f33d -> 2bb9227)

2021-01-25 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 801f33d  [CALCITE-4459] Verify the bytecode with Jandex by default
 add 2bb9227  Bump Gradle 6.7 -> 6.8.1

No new revisions were added by this update.

Summary of changes:
 build.gradle.kts | 5 +
 gradle/wrapper/gradle-wrapper.properties | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)



[calcite-avatica] branch master updated: Bump Gradle 6.7 -> 6.8.1

2021-01-25 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git


The following commit(s) were added to refs/heads/master by this push:
 new 49fe76e  Bump Gradle 6.7 -> 6.8.1
49fe76e is described below

commit 49fe76ebbe8b73342b7a34e4a822ee319a48687e
Author: Vladimir Sitnikov 
AuthorDate: Fri Jan 8 23:49:36 2021 +0300

Bump Gradle 6.7 -> 6.8.1

See https://docs.gradle.org/6.8.1/release-notes.html

- Faster Kotlin DSL script compilation
- Vendor selection for Java toolchains
- Task execution in composite builds
- Consistent dependency resolution
---
 build.gradle.kts | 5 +
 gradle/wrapper/gradle-wrapper.properties | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index d3173e1..97efb24 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -266,6 +266,11 @@ allprojects {
 sourceCompatibility = JavaVersion.VERSION_1_8
 targetCompatibility = JavaVersion.VERSION_1_8
 }
+configure {
+consistentResolution {
+useCompileClasspathVersions()
+}
+}
 
 repositories {
 if (enableMavenLocal) {
diff --git a/gradle/wrapper/gradle-wrapper.properties 
b/gradle/wrapper/gradle-wrapper.properties
index 5d03a70..1b6b616 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -16,7 +16,7 @@
 #
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionSha256Sum=8ad57759019a9233dc7dc4d1a530cefe109dc122000d57f7e623f8cf4ba9dfc4
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
+distributionSha256Sum=fd591a34af7385730970399f473afabdb8b28d57fd97d6625c388d090039d6fd
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists



[calcite] branch master updated (706ecc2 -> 801f33d)

2021-01-25 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 706ecc2  Site: Update talks from Calcite Meetup January 2021
 add 801f33d  [CALCITE-4459] Verify the bytecode with Jandex by default

No new revisions were added by this update.

Summary of changes:
 build.gradle.kts  | 2 +-
 gradle.properties | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)



[calcite] branch master updated (67ece68 -> 0a4a10d)

2021-01-16 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 67ece68  [CALCITE-4463] JDBC adapter for Spark generates incorrect 
ORDER BY syntax (Yanjing Wang)
 add 0a4a10d  [CALCITE-4470] Add optional bytecode verification with Jandex

No new revisions were added by this update.

Summary of changes:
 bom/build.gradle.kts |  1 +
 build.gradle.kts | 11 +++
 gradle.properties|  4 ++--
 settings.gradle.kts  |  7 +++
 4 files changed, 21 insertions(+), 2 deletions(-)



[calcite] branch master updated (174a707 -> f41d44a)

2021-01-10 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 174a707  [CALCITE-4443] Add ILIKE operator (as LIKE, but 
case-insensitive and PostgreSQL-specific) (Ondřej Štumpf)
 add f41d44a  Cancel stale workflows in GitHub Actions CI

No new revisions were added by this update.

Summary of changes:
 .github/workflows/cancel-duplicates.yml | 20 
 1 file changed, 20 insertions(+)
 create mode 100644 .github/workflows/cancel-duplicates.yml



[calcite] branch master updated (8b9618f -> 5ddd016)

2021-01-06 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 8b9618f  [CALCITE-4449] Generate nicer SQL for Sarg 'x IS NULL OR x 
NOT IN (1, 2)'
 add 5ddd016  Add ErrorProne and the Checker Framework verifications to 
Travis CI

No new revisions were added by this update.

Summary of changes:
 .travis.yml | 16 
 1 file changed, 16 insertions(+)



[calcite] 01/01: Require Java 1.8.0u202 or later for the build

2020-12-09 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit 3311d45bdf95eecac9659443b350080d0b5f4eee
Author: Vladimir Sitnikov 
AuthorDate: Wed Dec 9 11:27:04 2020 +0300

Require Java 1.8.0u202 or later for the build

Java versions prior to 1.8.0u202 have known issues that cause
invalid bytecode in certain patterns of annotation usage.
---
 build.gradle.kts | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/build.gradle.kts b/build.gradle.kts
index 697b02b..9255897 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -77,6 +77,20 @@ val werror by props(true) // treat javac warnings as errors
 // Inherited from stage-vote-release-plugin: skipSign, useGpgCmd
 // Inherited from gradle-extensions-plugin: slowSuiteLogThreshold=0L, 
slowTestLogThreshold=2000L
 
+// Java versions prior to 1.8.0u202 have known issues that cause invalid 
bytecode in certain patterns
+// of annotation usage.
+// So we require at least 1.8.0u202
+System.getProperty("java.version").let { version ->
+version.takeIf { it.startsWith("1.8.0_") }
+?.removePrefix("1.8.0_")
+?.toIntOrNull()
+?.let {
+require(it >= 202) {
+"Apache Calcite requires Java 1.8.0u202 or later. The current 
Java version is $version"
+}
+}
+}
+
 ide {
 copyrightToAsf()
 ideaInstructionsUri =



[calcite] branch master updated (fd20efd -> 3311d45)

2020-12-09 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


omit fd20efd  Require Java 1.8.0u202 or later for the build
 new 3311d45  Require Java 1.8.0u202 or later for the build

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (fd20efd)
\
 N -- N -- N   refs/heads/master (3311d45)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.gradle.kts | 16 +---
 1 file changed, 9 insertions(+), 7 deletions(-)



[calcite] branch master updated (32a8a38 -> fd20efd)

2020-12-09 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


 discard 32a8a38  Require Java 1.8.0u202 or later for the build
 add fd20efd  Require Java 1.8.0u202 or later for the build

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (32a8a38)
\
 N -- N -- N   refs/heads/master (fd20efd)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 build.gradle.kts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



[calcite] branch master updated (7900625 -> 32a8a38)

2020-12-09 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 7900625  Make sure compileJava is reexecuted in case of the minor 
javac version changes
 add 32a8a38  Require Java 1.8.0u202 or later for the build

No new revisions were added by this update.

Summary of changes:
 build.gradle.kts | 11 +++
 1 file changed, 11 insertions(+)



[calcite] branch master updated (404f968 -> 7900625)

2020-12-09 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 404f968  [CALCITE-4422] Add MethodCanBeStatic check via ErrorProne
 add 7900625  Make sure compileJava is reexecuted in case of the minor 
javac version changes

No new revisions were added by this update.

Summary of changes:
 build.gradle.kts | 2 ++
 1 file changed, 2 insertions(+)



[calcite] branch require_message created (now e3b152a)

2020-12-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch require_message
in repository https://gitbox.apache.org/repos/asf/calcite.git.


  at e3b152a  [CALCITE-4431] Use requireNonNull(var, "var") instead of 
requireNonNull(var) for better error messages

This branch includes the following new commits:

 new e3b152a  [CALCITE-4431] Use requireNonNull(var, "var") instead of 
requireNonNull(var) for better error messages

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[calcite] branch master updated (0327135 -> 404f968)

2020-12-07 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 0327135  [CALCITE-4408] Implement Oracle SUBSTR function (James Starr)
 add 404f968  [CALCITE-4422] Add MethodCanBeStatic check via ErrorProne

No new revisions were added by this update.

Summary of changes:
 build.gradle.kts   |  3 ++
 .../calcite/adapter/cassandra/CassandraRules.java  |  7 +--
 .../apache/calcite/adapter/clone/ColumnLoader.java |  6 +--
 .../calcite/adapter/enumerable/EnumUtils.java  |  6 +--
 .../adapter/enumerable/EnumerableLimitSort.java|  2 +-
 .../adapter/enumerable/EnumerableMatch.java|  8 +--
 .../adapter/enumerable/EnumerableMergeJoin.java|  4 +-
 .../enumerable/EnumerableRelImplementor.java   |  4 +-
 .../enumerable/EnumerableTableFunctionScan.java|  2 +-
 .../adapter/enumerable/EnumerableTableScan.java|  4 +-
 .../adapter/enumerable/EnumerableWindow.java   | 26 +-
 .../ReflectiveCallNotNullImplementor.java  |  2 +-
 .../calcite/adapter/enumerable/RexImpTable.java| 20 
 .../adapter/enumerable/RexToLixTranslator.java |  2 +-
 .../adapter/enumerable/StrictAggImplementor.java   |  4 +-
 .../org/apache/calcite/adapter/jdbc/JdbcRules.java |  2 +-
 .../apache/calcite/adapter/jdbc/JdbcSchema.java|  6 +--
 .../adapter/jdbc/JdbcToEnumerableConverter.java| 12 ++---
 .../apache/calcite/interpreter/AggregateNode.java  |  2 +-
 .../apache/calcite/interpreter/Interpreter.java|  2 +-
 .../org/apache/calcite/interpreter/SortNode.java   |  4 +-
 .../org/apache/calcite/jdbc/CalciteMetaImpl.java   |  6 +--
 .../org/apache/calcite/jdbc/CalciteResultSet.java  |  6 +--
 .../apache/calcite/jdbc/JavaTypeFactoryImpl.java   |  2 +-
 .../org/apache/calcite/materialize/Lattice.java|  2 +-
 .../calcite/materialize/LatticeSuggester.java  |  8 +--
 .../materialize/MaterializationService.java|  2 +-
 .../materialize/SqlLatticeStatisticProvider.java   |  2 +-
 .../java/org/apache/calcite/materialize/Step.java  |  2 +-
 .../apache/calcite/plan/ConventionTraitDef.java|  2 +-
 .../apache/calcite/plan/RexImplicationChecker.java | 12 ++---
 .../apache/calcite/plan/SubstitutionVisitor.java   |  2 +-
 .../org/apache/calcite/plan/hep/HepPlanner.java|  2 +-
 .../calcite/plan/volcano/IterativeRuleQueue.java   |  2 +-
 .../calcite/plan/volcano/VolcanoPlanner.java   |  2 +-
 .../calcite/prepare/CalciteCatalogReader.java  |  2 +-
 .../apache/calcite/prepare/CalcitePrepareImpl.java | 18 +++
 .../java/org/apache/calcite/prepare/Prepare.java   |  2 +-
 .../calcite/rel/externalize/RelDotWriter.java  |  2 +-
 .../apache/calcite/rel/externalize/RelJson.java|  8 +--
 .../calcite/rel/metadata/RelMdAllPredicates.java   |  2 +-
 .../calcite/rel/metadata/RelMdColumnOrigins.java   |  4 +-
 .../rel/metadata/RelMdColumnUniqueness.java|  4 +-
 .../calcite/rel/metadata/RelMdPredicates.java  |  8 +--
 .../org/apache/calcite/rel/metadata/RelMdSize.java |  3 +-
 .../calcite/rel/metadata/RelMdUniqueKeys.java  |  2 +-
 .../calcite/rel/rel2sql/RelToSqlConverter.java | 14 +++---
 .../apache/calcite/rel/rel2sql/SqlImplementor.java |  6 +--
 .../rel/rules/AggregateCaseToFilterRule.java   |  2 +-
 .../AggregateExpandDistinctAggregatesRule.java | 10 ++--
 .../rel/rules/AggregateJoinTransposeRule.java  |  2 +-
 .../calcite/rel/rules/AggregateMergeRule.java  |  2 +-
 .../rel/rules/AggregateReduceFunctionsRule.java| 22 -
 .../rel/rules/AggregateUnionAggregateRule.java |  2 +-
 .../rel/rules/AggregateUnionTransposeRule.java |  2 +-
 .../apache/calcite/rel/rules/CalcRelSplitter.java  |  4 +-
 .../apache/calcite/rel/rules/DateRangeRules.java   | 18 +++
 .../rel/rules/FilterAggregateTransposeRule.java|  2 +-
 .../apache/calcite/rel/rules/FilterJoinRule.java   |  2 +-
 .../calcite/rel/rules/JoinPushThroughJoinRule.java |  4 +-
 .../calcite/rel/rules/JoinToMultiJoinRule.java | 16 +++---
 .../calcite/rel/rules/LoptOptimizeJoinRule.java| 57 +++---
 .../calcite/rel/rules/LoptSemiJoinOptimizer.java   |  2 +-
 .../rel/rules/MultiJoinOptimizeBushyRule.java  |  2 +-
 .../calcite/rel/rules/ProjectToWindowRule.java |  6 +--
 .../rel/rules/ProjectWindowTransposeRule.java  |  4 +-
 .../apache/calcite/rel/rules/PushProjector.java|  2 +-
 .../calcite/rel/rules/ReduceDecimalsRule.java  |  2 +-
 .../calcite/rel/rules/ReduceExpressionsRule.java   |  2 +-
 .../rel/rules/SemiJoinJoinTransposeRule.java   |  2 +-
 .../rel/rules/SemiJoinProjectTransposeRule.java|  2 +-
 .../calcite/rel/rules/SubQueryRemoveRule.java  | 10 ++--
 .../java/org/apache/calcite/rex/RexBuilder.java|  2 +-
 .../org/apache/calcite/rex/RexInterpreter.java | 22 -
 .../java/org/apache/calcite/rex/RexSimplify.java   |  8

[calcite] branch master updated (3d13846 -> 2c28b5b)

2020-12-01 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 3d13846  Refactor SqlParserPos
 add 2c28b5b  Add regression warning to prevent users from upgrading to 
1.26.0

No new revisions were added by this update.

Summary of changes:
 site/_posts/2020-10-06-release-1.26.0.md | 5 +
 1 file changed, 5 insertions(+)



[calcite] branch master updated (b7e90e1 -> 3d13846)

2020-11-29 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from b7e90e1  [CALCITE-4251] Avoid NPE in LoptMultiJoin when 
mq.getColumnOrigin(left, i) returns null
 add 2de7237  [CALCITE-4214] Make 
org.apache.calcite.rel.type.RelDataType#getSqlTypeName non-nullable
 add 6908d21  [CALCITE-4199] Add CheckerFramework to GitHub Actions CI
 add 2f2fc40  [CALCITE-4199] Add package-level NonNull annotations to 
calcite packages
 add d9a81b8  [CALCITE-4199] Add nullability annotations
 add 853fb03  [CALCITE-4284] ImmutableBeans: make reference properties 
non-nullable by default
 add 3d13846  Refactor SqlParserPos

No new revisions were added by this update.

Summary of changes:
 .editorconfig  |   3 +
 .github/workflows/main.yml |  18 +
 bom/build.gradle.kts   |   4 +-
 build.gradle.kts   |  44 ++
 .../calcite/adapter/cassandra/CassandraFilter.java |   4 +-
 .../calcite/adapter/cassandra/CassandraLimit.java  |   4 +-
 .../adapter/cassandra/CassandraProject.java|   4 +-
 .../calcite/adapter/cassandra/CassandraSort.java   |   4 +-
 .../cassandra/CassandraToEnumerableConverter.java  |   4 +-
 core/build.gradle.kts  |   3 +-
 core/src/main/codegen/templates/Parser.jj  |  17 +-
 .../main/java/org/apache/calcite/DataContext.java  |  10 +-
 .../apache/calcite/adapter/clone/ArrayTable.java   | 108 +--
 .../apache/calcite/adapter/clone/CloneSchema.java  |   6 +-
 .../apache/calcite/adapter/clone/ColumnLoader.java |  49 +-
 .../calcite/adapter/enumerable/AggAddContext.java  |   4 +-
 .../calcite/adapter/enumerable/AggImpState.java|  19 +-
 .../adapter/enumerable/AggResultContext.java   |   4 +-
 .../calcite/adapter/enumerable/EnumUtils.java  | 161 +++--
 .../adapter/enumerable/EnumerableAggregate.java|  17 +-
 .../enumerable/EnumerableAggregateBase.java|  19 +-
 .../enumerable/EnumerableAggregateRule.java|   4 +-
 .../enumerable/EnumerableBatchNestedLoopJoin.java  |  11 +-
 .../adapter/enumerable/EnumerableBindable.java |  13 +-
 .../calcite/adapter/enumerable/EnumerableCalc.java |   6 +-
 .../adapter/enumerable/EnumerableConvention.java   |   8 +-
 .../adapter/enumerable/EnumerableCorrelate.java|   6 +-
 .../adapter/enumerable/EnumerableFilter.java   |   6 +-
 .../adapter/enumerable/EnumerableHashJoin.java |   8 +-
 .../enumerable/EnumerableInterpretable.java|  23 +-
 .../adapter/enumerable/EnumerableInterpreter.java  |  10 +-
 .../adapter/enumerable/EnumerableIntersect.java|   4 +-
 .../adapter/enumerable/EnumerableLimit.java|  14 +-
 .../adapter/enumerable/EnumerableLimitSort.java|  19 +-
 .../adapter/enumerable/EnumerableMatch.java|  33 +-
 .../adapter/enumerable/EnumerableMergeJoin.java|  44 +-
 .../enumerable/EnumerableMergeJoinRule.java|   4 +-
 .../adapter/enumerable/EnumerableMinus.java|   6 +-
 .../enumerable/EnumerableNestedLoopJoin.java   |   8 +-
 .../adapter/enumerable/EnumerableProject.java  |   6 +-
 .../calcite/adapter/enumerable/EnumerableRel.java  |   6 +-
 .../adapter/enumerable/EnumerableRelFactories.java |   7 +-
 .../enumerable/EnumerableRelImplementor.java   |   6 +-
 .../calcite/adapter/enumerable/EnumerableSort.java |  14 +-
 .../adapter/enumerable/EnumerableSortRule.java |   4 +-
 .../enumerable/EnumerableSortedAggregate.java  |  24 +-
 .../enumerable/EnumerableSortedAggregateRule.java  |   4 +-
 .../enumerable/EnumerableTableFunctionScan.java|  19 +-
 .../adapter/enumerable/EnumerableTableModify.java  |   6 +-
 .../enumerable/EnumerableTableModifyRule.java  |   4 +-
 .../adapter/enumerable/EnumerableTableScan.java|  19 +-
 .../enumerable/EnumerableTableScanRule.java|   4 +-
 .../adapter/enumerable/EnumerableTraitsUtils.java  |   9 +-
 .../adapter/enumerable/EnumerableUncollect.java|   4 +-
 .../adapter/enumerable/EnumerableUnion.java|   4 +-
 .../adapter/enumerable/EnumerableValues.java   |  12 +-
 .../adapter/enumerable/EnumerableWindow.java   |  73 +-
 .../calcite/adapter/enumerable/JavaRowFormat.java  |  16 +-
 .../adapter/enumerable/NestedBlockBuilderImpl.java |   1 +
 .../calcite/adapter/enumerable/PhysType.java   |   6 +-
 .../calcite/adapter/enumerable/PhysTypeImpl.java   |  12 +-
 .../calcite/adapter/enumerable/RexImpTable.java|  76 +-
 .../adapter/enumerable/RexToLixTranslator.java | 113 +--
 .../adapter/enumerable/StrictAggImplementor.java   |   5 +-
 .../enumerable/impl/AggResultContextImpl.java  |  27 +-
 .../calcite/adapter/java/ReflectiveSchema.java |  39 +-
 .../calcite/adapter/jdbc/JdbcCatalogSchema.java|  20 +-
 .../calcite/adapter/jdbc/JdbcQueryProvider.java|   4 +-
 .../org/apache

[calcite] branch master updated (1f14e97 -> b7e90e1)

2020-11-29 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 1f14e97  Remove multiple blank lines after package statements
 add 6e32d03  Bump de.thetaphi.forbiddenapis from 2.7 to 3.1
 add d3cf485  Bump AppVeyor image from 2017 to 2019 to test with newer 
Java: 1.8u162 -> 1.8u221, 13 -> 15
 add b7e90e1  [CALCITE-4251] Avoid NPE in LoptMultiJoin when 
mq.getColumnOrigin(left, i) returns null

No new revisions were added by this update.

Summary of changes:
 appveyor.yml   | 4 ++--
 core/src/main/java/org/apache/calcite/rel/rules/LoptMultiJoin.java | 2 +-
 gradle.properties  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)



[calcite] branch master updated: Remove multiple blank lines after package statements

2020-11-29 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 1f14e97  Remove multiple blank lines after package statements
1f14e97 is described below

commit 1f14e97060df55f873dd2f124caea90f39511512
Author: Vladimir Sitnikov 
AuthorDate: Sun Nov 29 15:32:56 2020 +0300

Remove multiple blank lines after package statements

A single blank line after package is enough.
---
 build.gradle.kts | 1 +
 core/src/main/java/org/apache/calcite/plan/CommonRelSubExprRule.java | 1 -
 core/src/main/java/org/apache/calcite/rel/type/DynamicRecordType.java| 1 -
 core/src/main/java/org/apache/calcite/schema/SemiMutableSchema.java  | 1 -
 core/src/main/java/org/apache/calcite/sql/SqlOperandCountRange.java  | 1 -
 core/src/main/java/org/apache/calcite/sql/util/IdPair.java   | 1 -
 core/src/main/java/org/apache/calcite/sql/validate/ScopeChild.java   | 1 -
 core/src/main/java/org/apache/calcite/sql/validate/SqlConformance.java   | 1 -
 .../main/java/org/apache/calcite/linq4j/tree/ConstructorDeclaration.java | 1 -
 .../src/main/java/org/apache/calcite/linq4j/tree/MethodDeclaration.java  | 1 -
 10 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index f2734ca..31703fa 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -474,6 +474,7 @@ allprojects {
 "static "
 )
 removeUnusedImports()
+replaceRegex("Avoid 2+ blank lines after package", 
"^package\\s+([^;]+)\\s*;\\n{3,}", "package \$1;\n\n")
 replaceRegex("Avoid 2+ blank lines after import", 
"^import\\s+([^;]+)\\s*;\\n{3,}", "import \$1;\n\n")
 indentWithSpaces(2)
 replaceRegex("@Override should not be on its own line", 
"(@Override)\\s{2,}", "\$1 ")
diff --git 
a/core/src/main/java/org/apache/calcite/plan/CommonRelSubExprRule.java 
b/core/src/main/java/org/apache/calcite/plan/CommonRelSubExprRule.java
index 4e3ce99..e39f7e0 100644
--- a/core/src/main/java/org/apache/calcite/plan/CommonRelSubExprRule.java
+++ b/core/src/main/java/org/apache/calcite/plan/CommonRelSubExprRule.java
@@ -16,7 +16,6 @@
  */
 package org.apache.calcite.plan;
 
-
 /**
  * A CommonRelSubExprRule is an abstract base class for rules
  * that are fired only on relational expressions that appear more than once
diff --git 
a/core/src/main/java/org/apache/calcite/rel/type/DynamicRecordType.java 
b/core/src/main/java/org/apache/calcite/rel/type/DynamicRecordType.java
index a76e147..99461ce 100644
--- a/core/src/main/java/org/apache/calcite/rel/type/DynamicRecordType.java
+++ b/core/src/main/java/org/apache/calcite/rel/type/DynamicRecordType.java
@@ -16,7 +16,6 @@
  */
 package org.apache.calcite.rel.type;
 
-
 /**
  * Specific type of RelRecordType that corresponds to a dynamic table,
  * where columns are created as they are requested.
diff --git 
a/core/src/main/java/org/apache/calcite/schema/SemiMutableSchema.java 
b/core/src/main/java/org/apache/calcite/schema/SemiMutableSchema.java
index e2835a4..002bbc9 100644
--- a/core/src/main/java/org/apache/calcite/schema/SemiMutableSchema.java
+++ b/core/src/main/java/org/apache/calcite/schema/SemiMutableSchema.java
@@ -16,7 +16,6 @@
  */
 package org.apache.calcite.schema;
 
-
 /**
  * Schema to which materializations can be added.
  */
diff --git 
a/core/src/main/java/org/apache/calcite/sql/SqlOperandCountRange.java 
b/core/src/main/java/org/apache/calcite/sql/SqlOperandCountRange.java
index 88382f7..4365afe 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlOperandCountRange.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlOperandCountRange.java
@@ -16,7 +16,6 @@
  */
 package org.apache.calcite.sql;
 
-
 /**
  * A class that describes how many operands an operator can take.
  */
diff --git a/core/src/main/java/org/apache/calcite/sql/util/IdPair.java 
b/core/src/main/java/org/apache/calcite/sql/util/IdPair.java
index 9cd211d..7b320b8 100644
--- a/core/src/main/java/org/apache/calcite/sql/util/IdPair.java
+++ b/core/src/main/java/org/apache/calcite/sql/util/IdPair.java
@@ -16,7 +16,6 @@
  */
 package org.apache.calcite.sql.util;
 
-
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
diff --git a/core/src/main/java/org/apache/calcite/sql/validate/ScopeChild.java 
b/core/src/main/java/org/apache/calcite/sql/validate/ScopeChild.java
index 9a6c8d7..9186daf 100644
--- a/core/src/main/java/org/apache/calcite/sql/validate/ScopeChild.java
+++ b/core/src/main/java/org/apache/calcite/sql/validate/ScopeChild.java
@@ -16,7 +16,6 @@
  */
 package org.

[calcite] branch master updated: Remove multiple blank lines after import statements

2020-11-29 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new b75c549  Remove multiple blank lines after import statements
b75c549 is described below

commit b75c549194bcbb1e2c028b28fd1858c4e300bd41
Author: Vladimir Sitnikov 
AuthorDate: Sun Nov 29 14:12:04 2020 +0300

Remove multiple blank lines after import statements

A single blank line between imports and the following javadoc is enough.
---
 build.gradle.kts| 1 +
 .../java/org/apache/calcite/adapter/enumerable/EnumerableCalcRule.java  | 1 -
 .../java/org/apache/calcite/adapter/enumerable/EnumerableProject.java   | 1 -
 .../org/apache/calcite/adapter/enumerable/EnumerableProjectRule.java| 1 -
 .../calcite/adapter/enumerable/EnumerableSortedAggregateRule.java   | 1 -
 .../org/apache/calcite/interpreter/NoneToBindableConverterRule.java | 1 -
 core/src/main/java/org/apache/calcite/rex/RexUtil.java  | 1 -
 core/src/main/java/org/apache/calcite/sql/ddl/SqlDdlNodes.java  | 2 --
 core/src/main/java/org/apache/calcite/sql/ddl/SqlDropObject.java| 1 -
 core/src/test/java/org/apache/calcite/test/MockSqlOperatorTable.java| 1 -
 .../java/org/apache/calcite/adapter/elasticsearch/Projection2Test.java  | 1 -
 mongodb/src/test/java/org/apache/calcite/test/MongoAssertions.java  | 1 -
 12 files changed, 1 insertion(+), 12 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index e6e3742..f2734ca 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -474,6 +474,7 @@ allprojects {
 "static "
 )
 removeUnusedImports()
+replaceRegex("Avoid 2+ blank lines after import", 
"^import\\s+([^;]+)\\s*;\\n{3,}", "import \$1;\n\n")
 indentWithSpaces(2)
 replaceRegex("@Override should not be on its own line", 
"(@Override)\\s{2,}", "\$1 ")
 replaceRegex("@Test should not be on its own line", 
"(@Test)\\s{2,}", "\$1 ")
diff --git 
a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableCalcRule.java
 
b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableCalcRule.java
index d8c5fe5..1818feb 100644
--- 
a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableCalcRule.java
+++ 
b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableCalcRule.java
@@ -22,7 +22,6 @@ import org.apache.calcite.rel.RelNode;
 import org.apache.calcite.rel.convert.ConverterRule;
 import org.apache.calcite.rel.logical.LogicalCalc;
 
-
 /**
  * Rule to convert a {@link org.apache.calcite.rel.logical.LogicalCalc} to an
  * {@link EnumerableCalc}.
diff --git 
a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableProject.java
 
b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableProject.java
index 4c71883..fe404e1 100644
--- 
a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableProject.java
+++ 
b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableProject.java
@@ -32,7 +32,6 @@ import com.google.common.collect.ImmutableList;
 
 import java.util.List;
 
-
 /** Implementation of {@link org.apache.calcite.rel.core.Project} in
  * {@link org.apache.calcite.adapter.enumerable.EnumerableConvention 
enumerable calling convention}. */
 public class EnumerableProject extends Project implements EnumerableRel {
diff --git 
a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableProjectRule.java
 
b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableProjectRule.java
index b5da3cb..3b5420b 100644
--- 
a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableProjectRule.java
+++ 
b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableProjectRule.java
@@ -21,7 +21,6 @@ import org.apache.calcite.rel.RelNode;
 import org.apache.calcite.rel.convert.ConverterRule;
 import org.apache.calcite.rel.logical.LogicalProject;
 
-
 /**
  * Rule to convert a {@link org.apache.calcite.rel.logical.LogicalProject} to 
an
  * {@link EnumerableProject}.
diff --git 
a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableSortedAggregateRule.java
 
b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableSortedAggregateRule.java
index cfc3660..548569f 100644
--- 
a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableSortedAggregateRule.java
+++ 
b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableSortedAggregateRule.java
@@ -25,7 +25,6 @@ import org.apache.calcite.rel.core.Aggregate;
 import org.apache.calcite.rel.logical.LogicalAggregate;
 imp

[calcite-site] 01/01: Add regression warning to prevent users from upgrading to 1.26.0

2020-11-15 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-site.git

commit dad9ccf947118f6dbc82d51ef88799802083164d
Author: Vladimir Sitnikov 
AuthorDate: Sun Nov 15 13:55:24 2020 +0300

Add regression warning to prevent users from upgrading to 1.26.0
---
 news/2020/10/06/release-1.26.0/index.html | 4 
 news/index.html   | 4 
 2 files changed, 8 insertions(+)

diff --git a/news/2020/10/06/release-1.26.0/index.html 
b/news/2020/10/06/release-1.26.0/index.html
index 6329e59..dfd02a0 100644
--- a/news/2020/10/06/release-1.26.0/index.html
+++ b/news/2020/10/06/release-1.26.0/index.html
@@ -141,6 +141,10 @@
 is pleased to announce
 Apache Calcite release 1.26.0.
 
+Warning: Calcite 1.26.0 has severe issues 
with RexNode simplification caused by 
SEARCH operator (
+wrong data from query optimization, NullPointerException), so use 1.26.0 for 
development only,
+and beware that Calcite 1.26.0 would corrupt your data.
+
 This release comes about two months after 1.25.0 and includes more than 70 
resolved
 issues, comprising a lot of new features and bug-fixes. Among others, it is 
worth highlighting the following.
 
diff --git a/news/index.html b/news/index.html
index b050aca..f90170f 100644
--- a/news/index.html
+++ b/news/index.html
@@ -146,6 +146,10 @@
 is pleased to announce
 Apache Calcite release 1.26.0.
 
+Warning: Calcite 1.26.0 has severe issues 
with RexNode simplification caused by 
SEARCH operator (
+wrong data from query optimization, NullPointerException), so use 1.26.0 for 
development only,
+and beware that Calcite 1.26.0 would corrupt your data.
+
 This release comes about two months after 1.25.0 and includes more than 70 
resolved
 issues, comprising a lot of new features and bug-fixes. Among others, it is 
worth highlighting the following.
 



[calcite-site] branch master updated (b8bc73f -> dad9ccf)

2020-11-15 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-site.git.


 discard b8bc73f  Add regression warning to prevent users from upgrading to 
1.26.0
 new dad9ccf  Add regression warning to prevent users from upgrading to 
1.26.0

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (b8bc73f)
\
 N -- N -- N   refs/heads/master (dad9ccf)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 news/index.html | 4 
 1 file changed, 4 insertions(+)



[calcite-site] branch master updated: Add regression warning to prevent users from upgrading to 1.26.0

2020-11-15 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-site.git


The following commit(s) were added to refs/heads/master by this push:
 new b8bc73f  Add regression warning to prevent users from upgrading to 
1.26.0
b8bc73f is described below

commit b8bc73fe109608baf9a0d3254fe671b9d1b0d2dd
Author: Vladimir Sitnikov 
AuthorDate: Sun Nov 15 13:55:24 2020 +0300

Add regression warning to prevent users from upgrading to 1.26.0
---
 news/2020/10/06/release-1.26.0/index.html | 4 
 1 file changed, 4 insertions(+)

diff --git a/news/2020/10/06/release-1.26.0/index.html 
b/news/2020/10/06/release-1.26.0/index.html
index 6329e59..dfd02a0 100644
--- a/news/2020/10/06/release-1.26.0/index.html
+++ b/news/2020/10/06/release-1.26.0/index.html
@@ -141,6 +141,10 @@
 is pleased to announce
 Apache Calcite release 1.26.0.
 
+Warning: Calcite 1.26.0 has severe issues 
with RexNode simplification caused by 
SEARCH operator (
+wrong data from query optimization, NullPointerException), so use 1.26.0 for 
development only,
+and beware that Calcite 1.26.0 would corrupt your data.
+
 This release comes about two months after 1.25.0 and includes more than 70 
resolved
 issues, comprising a lot of new features and bug-fixes. Among others, it is 
worth highlighting the following.
 



[calcite] branch master updated: Add regression warning to prevent users from upgrading to 1.26.0

2020-11-15 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new c6b3fb7  Add regression warning to prevent users from upgrading to 
1.26.0
c6b3fb7 is described below

commit c6b3fb7ddbf8aed981ff3fb0632c77216dbe68d6
Author: Vladimir Sitnikov 
AuthorDate: Sun Nov 15 13:52:45 2020 +0300

Add regression warning to prevent users from upgrading to 1.26.0
---
 site/_posts/2020-10-06-release-1.26.0.md | 4 
 1 file changed, 4 insertions(+)

diff --git a/site/_posts/2020-10-06-release-1.26.0.md 
b/site/_posts/2020-10-06-release-1.26.0.md
index e09bfe7..bc3995e 100644
--- a/site/_posts/2020-10-06-release-1.26.0.md
+++ b/site/_posts/2020-10-06-release-1.26.0.md
@@ -30,6 +30,10 @@ The [Apache Calcite PMC]({{ site.baseurl }})
 is pleased to announce
 [Apache Calcite release 1.26.0]({{ site.baseurl }}/docs/history.html#v1-26-0).
 
+**Warning:** Calcite 1.26.0 has **severe** issues with `RexNode` 
simplification caused by `SEARCH operator` (
+wrong data from query optimization, `NullPointerException`), so use 1.26.0 for 
development only,
+and beware that Calcite 1.26.0 would corrupt your data.
+
 This release comes about two months after 1.25.0 and includes more than 70 
resolved
 issues, comprising a lot of new features and bug-fixes. Among others, it is 
worth highlighting the following.
 



[calcite] branch site updated: Add regression warning to prevent users from upgrading to 1.26.0

2020-11-15 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch site
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/site by this push:
 new 9fd6ab4  Add regression warning to prevent users from upgrading to 
1.26.0
9fd6ab4 is described below

commit 9fd6ab43a700cc6900275d0e0759cad53d3591c6
Author: Vladimir Sitnikov 
AuthorDate: Sun Nov 15 13:52:45 2020 +0300

Add regression warning to prevent users from upgrading to 1.26.0
---
 site/_posts/2020-10-06-release-1.26.0.md | 4 
 1 file changed, 4 insertions(+)

diff --git a/site/_posts/2020-10-06-release-1.26.0.md 
b/site/_posts/2020-10-06-release-1.26.0.md
index e09bfe7..bc3995e 100644
--- a/site/_posts/2020-10-06-release-1.26.0.md
+++ b/site/_posts/2020-10-06-release-1.26.0.md
@@ -30,6 +30,10 @@ The [Apache Calcite PMC]({{ site.baseurl }})
 is pleased to announce
 [Apache Calcite release 1.26.0]({{ site.baseurl }}/docs/history.html#v1-26-0).
 
+**Warning:** Calcite 1.26.0 has **severe** issues with `RexNode` 
simplification caused by `SEARCH operator` (
+wrong data from query optimization, `NullPointerException`), so use 1.26.0 for 
development only,
+and beware that Calcite 1.26.0 would corrupt your data.
+
 This release comes about two months after 1.25.0 and includes more than 70 
resolved
 issues, comprising a lot of new features and bug-fixes. Among others, it is 
worth highlighting the following.
 



[calcite] branch master updated (c8b5622 -> 7b043bf)

2020-11-14 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from c8b5622  Following 4364, fix the plann diff of TpcdsTest
 add 44623f3  Revert "Following 4364, fix the plann diff of TpcdsTest"
 add 81ea94b  Revert "[CALCITE-4383] In RelBuilder, optimize 'VALUES ... 
UNION ALL ... VALUES' to a single 'VALUES' with multiple rows"
 add 4282c53  Revert "[CALCITE-4389] Calls to ROW and anonymous row 
operators sometimes print too many spaces"
 add e6f4ba1  Revert "[CALCITE-4364] `a IN (1, 2) AND a = 1` should be 
simplified to `a = 1`"
 add d716104  Revert "[CALCITE-4352] RexSimplify incorrectly drops IS NULL 
and IS NOT NULL from SEARCH expressions"
 add 3da4293  Revert "[CALCITE-4325] RexSimplify incorrectly simplifies 
complex expressions that contain Sarg and IS NULL"
 add 448d8b4  Revert "[CALCITE-4237] Following [CALCITE-4173], fix 
assertion error when RexSimplify generates Sarg with single null only"
 add 02f88da  Revert "[CALCITE-4259] Support JDK 15 and Guava version 
29.0-jre"
 add 56d2cf7  Revert "[CALCITE-4271] RelBuilder.in should allow duplicate 
values"
 add d665927  Revert "[CALCITE-4279] SEARCH operator cannot be pushed into 
Druid"
 add 2e7754f  Revert "[CALCITE-4173] Add internal SEARCH operator and Sarg 
literal that represents a set of values or ranges"
 add 3a32919  Remove usage of SEARCH in Innodb adapter
 add 103004c  Re-enable RexProgramFuzzyTest
 add 5d2959d  Add workaround for CALCITE-4388: verify expression safety in 
RexCall#isAlwaysTrue/isAlwaysFalse
 add c2a1053  Add workaround for CALCITE-4397 
StandardConvertletTable#convertDatetimeMinus is inconsistent with MINUS_DATE 
return type inference
 add 68266a3  Add workaround for CALCITE-4398 RexSimplify introduces 
cast(nullable as nonnull)
 add 7b043bf  [CALCITE-4399] Ignore testReduceNullableToNotNull2 since it 
does not work

No new revisions were added by this update.

Summary of changes:
 .../adapter/enumerable/RexToLixTranslator.java |   5 -
 .../org/apache/calcite/jdbc/CalciteMetaImpl.java   |   4 -
 .../apache/calcite/plan/SubstitutionVisitor.java   |   4 -
 .../calcite/rel/rel2sql/RelToSqlConverter.java |  24 +-
 .../apache/calcite/rel/rel2sql/SqlImplementor.java | 217 ++
 .../calcite/rel/rules/SubQueryRemoveRule.java  |   6 +-
 .../java/org/apache/calcite/rex/RexBuilder.java| 155 +--
 .../main/java/org/apache/calcite/rex/RexCall.java  |  28 +-
 .../java/org/apache/calcite/rex/RexLiteral.java| 302 ++
 .../java/org/apache/calcite/rex/RexSimplify.java   | 434 +++-
 .../main/java/org/apache/calcite/rex/RexUtil.java  | 198 -
 .../java/org/apache/calcite/sql/SqlDialect.java|  28 +-
 .../main/java/org/apache/calcite/sql/SqlKind.java  |  24 --
 .../java/org/apache/calcite/sql/SqlNodeList.java   |   2 -
 .../apache/calcite/sql/fun/SqlBetweenOperator.java |   7 +-
 .../org/apache/calcite/sql/fun/SqlInOperator.java  |   3 +-
 .../calcite/sql/fun/SqlInternalOperators.java  |  96 -
 .../org/apache/calcite/sql/fun/SqlRowOperator.java |   1 +
 .../apache/calcite/sql/fun/SqlSearchOperator.java  |  57 ---
 .../calcite/sql/fun/SqlStdOperatorTable.java   |   5 -
 .../org/apache/calcite/sql/type/SqlTypeName.java   |   5 +-
 .../apache/calcite/sql2rel/SqlToRelConverter.java  |  21 +-
 .../java/org/apache/calcite/tools/RelBuilder.java  |  96 +
 .../src/main/java/org/apache/calcite/util/Bug.java |   5 +
 .../java/org/apache/calcite/util/RangeSets.java| 398 --
 .../main/java/org/apache/calcite/util/Sarg.java| 209 --
 .../calcite/jdbc/CalciteRemoteDriverTest.java  |   5 +-
 .../rel/rel2sql/RelToSqlConverterStructsTest.java  |   3 +-
 .../calcite/rel/rel2sql/RelToSqlConverterTest.java | 201 --
 .../calcite/rel/rules/DateRangeRulesTest.java  |  10 +-
 .../apache/calcite/rex/RexProgramBuilderBase.java  |   7 +-
 .../org/apache/calcite/rex/RexProgramTest.java | 391 +++---
 .../org/apache/calcite/rex/RexProgramTestBase.java |  59 +--
 .../org/apache/calcite/test/JdbcAdapterTest.java   |  49 ++-
 .../java/org/apache/calcite/test/JdbcTest.java |  17 +-
 .../java/org/apache/calcite/test/Matchers.java |  30 --
 .../test/MaterializedViewRelOptRulesTest.java  |  46 ++-
 .../org/apache/calcite/test/RelBuilderTest.java| 228 +--
 .../org/apache/calcite/test/RelMetadataTest.java   |   2 +-
 .../org/apache/calcite/test/RelOptRulesTest.java   |   6 +-
 .../apache/calcite/test/SqlToRelConverterTest.java |   3 +-
 .../calcite/test/fuzzer/RexProgramFuzzyTest.java   |  93 -
 .../apache/calcite/test/fuzzer/RexShrinker.java|  30 +-
 .../java/org/apache/calcite/util/RangeSetTest.java | 44

[calcite] branch master updated: Add OpenJ9 1.8 CI job at GitHub Actions

2020-11-06 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new d226a94  Add OpenJ9 1.8 CI job at GitHub Actions
d226a94 is described below

commit d226a9456a8cfdb108a50744d702e915b46c7ffa
Author: Vladimir Sitnikov 
AuthorDate: Fri Nov 6 01:44:38 2020 +0300

Add OpenJ9 1.8 CI job at GitHub Actions
---
 .github/workflows/main.yml | 28 ++
 .../apache/calcite/util/ImmutableBitSetTest.java   |  5 ++--
 .../calcite/adapter/os/JpsTableFunction.java   |  4 +++-
 .../apache/calcite/adapter/os/OsAdapterTest.java   |  1 +
 4 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 70c3e25..f159646 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -102,6 +102,34 @@ jobs:
   calcite.avatica.version=1.0.0-dev-master-SNAPSHOT
   enableMavenLocal=
 
+  linux-openj9:
+if: github.event.action != 'labeled'
+name: 'Linux (OpenJ9 8)'
+runs-on: macos-latest
+steps:
+  - uses: actions/checkout@v2
+with:
+  fetch-depth: 50
+  - uses: AdoptOpenJDK/install-jdk@v1
+with:
+  impl: openj9
+  version: '8'
+  architecture: x64
+  - uses: burrunan/gradle-cache-action@v1
+name: Test
+with:
+  job-id: jdk8-openj9
+  arguments: --scan --no-parallel --no-daemon build javadoc
+  - name: 'sqlline and sqllsh'
+run: |
+  ./sqlline -e '!quit'
+  echo
+  echo Sqlline example/csv
+  ./example/csv/sqlline --verbose -u 
jdbc:calcite:model=example/csv/src/test/resources/model.json -n admin -p admin 
-f example/csv/src/test/resources/smoke_test.sql
+  echo
+  echo sqlsh
+  ./sqlsh -o headers "select count(*) commits, author from (select 
substring(author, 1, position(' <' in author)-1) author from git_commits) group 
by author order by count(*) desc, author limit 20"
+
   mac:
 if: github.event.action != 'labeled'
 name: 'macOS (JDK 15)'
diff --git 
a/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java 
b/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java
index a7f44e7..e963240 100644
--- a/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java
+++ b/core/src/test/java/org/apache/calcite/util/ImmutableBitSetTest.java
@@ -36,7 +36,6 @@ import java.util.SortedMap;
 import java.util.TreeMap;
 import java.util.TreeSet;
 
-import static org.hamcrest.CoreMatchers.anyOf;
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.CoreMatchers.sameInstance;
@@ -546,8 +545,8 @@ class ImmutableBitSetTest {
 try {
   final ImmutableBitSet x = bitSet.shift(-5);
   fail("Expected error, got " + x);
-} catch (ArrayIndexOutOfBoundsException e) {
-  assertThat(e.getMessage(), anyOf(is("-1"), is("Index -1 out of bounds 
for length 0")));
+} catch (ArrayIndexOutOfBoundsException ignored) {
+  // Exact message is not specified by Java
 }
 final ImmutableBitSet empty = ImmutableBitSet.of();
 assertThat(empty.shift(-100), is(empty));
diff --git 
a/plus/src/main/java/org/apache/calcite/adapter/os/JpsTableFunction.java 
b/plus/src/main/java/org/apache/calcite/adapter/os/JpsTableFunction.java
index fda75aa..fbca3af 100644
--- a/plus/src/main/java/org/apache/calcite/adapter/os/JpsTableFunction.java
+++ b/plus/src/main/java/org/apache/calcite/adapter/os/JpsTableFunction.java
@@ -43,7 +43,9 @@ public class JpsTableFunction {
   public static ScannableTable eval(boolean b) {
 return new ScannableTable() {
   @Override public Enumerable scan(DataContext root) {
-return Processes.processLines("jps", "-mlvV")
+// https://github.com/eclipse/openj9/issues/11036
+// openj9 jps doesn't handle multiple flags in one argument
+return Processes.processLines("jps", "-m", "-l", "-v")
 .select(a0 -> {
   final String[] fields = a0.split(" ");
   return new Object[]{Long.valueOf(fields[0]), fields[1]};
diff --git 
a/plus/src/test/java/org/apache/calcite/adapter/os/OsAdapterTest.java 
b/plus/src/test/java/org/apache/calcite/adapter/os/OsAdapterTest.java
index 99e7458..0a4e9fe 100644
--- a/plus/src/test/java/org/apache/calcite/adapter/os/OsAdapterTest.java
+++ b/plus/src/test/java/org/apache/calcite/adapter/os/OsAdapterTest.java
@@ -207,6 +207,7 @@ class OsAdapterTest {
   }
 
   @Test void testJps() {
+assumeToolExists("jps");
 final String q = "select pid, info from jps";
 sql(q).returns(r -> {
   try {



[calcite-avatica] branch master updated: Remove files that change often from Travis cache, remove broken files automatically

2020-10-18 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git


The following commit(s) were added to refs/heads/master by this push:
 new c614d41  Remove files that change often from Travis cache, remove 
broken files automatically
c614d41 is described below

commit c614d41a277ddff388dcd26fe6d6b8ed167d110e
Author: Vladimir Sitnikov 
AuthorDate: Sun Oct 18 12:13:30 2020 +0300

Remove files that change often from Travis cache, remove broken files 
automatically

The cache itself is useful, however, there might be two problems:
* Corrupted files might get cached, so the subsequent builds would fail
* Too large cache might slowdown the build

cleanup-gradle-cache solves both issues.

The cache itself is still re-uploaded on every build (see "store build 
cache"),
so it might need more investigations.
---
 .travis.yml | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index d9198e1..0440e9b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -44,10 +44,8 @@ git:
   depth: 1
 #sudo: required
 before_cache:
-  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
-  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
+  - F=CleanupGradleCache sh -x -c 'curl -O 
https://raw.githubusercontent.com/vlsi/cleanup-gradle-cache/v1.x/$F.java && 
javac -J-Xmx128m $F.java && java -Xmx128m $F'
 cache:
   directories:
 - $HOME/.gradle/caches/
 - $HOME/.gradle/wrapper/
-# End .travis.yml



[calcite-avatica] branch master updated (8e7338b -> 0c9e8db)

2020-10-18 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite-avatica.git.


from 8e7338b  [CALCITE-3841] Change downloads page to use 
downloads.apache.org
 add 0c9e8db  Update Gradle: 6.3 -> 6.7

No new revisions were added by this update.

Summary of changes:
 gradle/wrapper/gradle-wrapper.jar| Bin 58694 -> 59203 bytes
 gradle/wrapper/gradle-wrapper.properties |   4 ++--
 gradlew  |   2 ++
 gradlew.bat  |  22 --
 4 files changed, 8 insertions(+), 20 deletions(-)



[calcite] branch master updated (cd922de -> 9f13325)

2020-10-17 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from cd922de  Site: fix aggregate function doc
 add fbef7c8  Make buildSrc jars reproducible for better caching
 add 9f13325  Remove files that change often from Travis cache, remove 
broken files automatically

No new revisions were added by this update.

Summary of changes:
 .travis.yml   | 6 ++
 buildSrc/build.gradle.kts | 7 +++
 2 files changed, 9 insertions(+), 4 deletions(-)



[calcite] branch master updated: [CALCITE-4339] Update Gradle: 6.6 -> 6.7

2020-10-16 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 538f6ae  [CALCITE-4339] Update Gradle: 6.6 -> 6.7
538f6ae is described below

commit 538f6ae70d82c23f4afb72fbea5bc8b49a81fe52
Author: Vladimir Sitnikov 
AuthorDate: Mon Oct 12 23:58:38 2020 +0300

[CALCITE-4339] Update Gradle: 6.6 -> 6.7
---
 gradle/wrapper/gradle-wrapper.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gradle/wrapper/gradle-wrapper.properties 
b/gradle/wrapper/gradle-wrapper.properties
index db14f73..5d03a70 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -16,7 +16,7 @@
 #
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionSha256Sum=e6f83508f0970452f56197f610d13c5f593baaf43c0e3c6a571e5967be754025
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip
+distributionSha256Sum=8ad57759019a9233dc7dc4d1a530cefe109dc122000d57f7e623f8cf4ba9dfc4
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists



[calcite] branch master updated: [CALCITE-4339] Update Gradle: 6.6 -> 6.7

2020-10-16 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 538f6ae  [CALCITE-4339] Update Gradle: 6.6 -> 6.7
538f6ae is described below

commit 538f6ae70d82c23f4afb72fbea5bc8b49a81fe52
Author: Vladimir Sitnikov 
AuthorDate: Mon Oct 12 23:58:38 2020 +0300

[CALCITE-4339] Update Gradle: 6.6 -> 6.7
---
 gradle/wrapper/gradle-wrapper.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gradle/wrapper/gradle-wrapper.properties 
b/gradle/wrapper/gradle-wrapper.properties
index db14f73..5d03a70 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -16,7 +16,7 @@
 #
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionSha256Sum=e6f83508f0970452f56197f610d13c5f593baaf43c0e3c6a571e5967be754025
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip
+distributionSha256Sum=8ad57759019a9233dc7dc4d1a530cefe109dc122000d57f7e623f8cf4ba9dfc4
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists



[calcite] branch gradle_67 created (now 18faf6f)

2020-10-15 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch gradle_67
in repository https://gitbox.apache.org/repos/asf/calcite.git.


  at 18faf6f  [CALCITE-4339] Update Gradle: 6.6 -> 6.7

This branch includes the following new commits:

 new 18faf6f  [CALCITE-4339] Update Gradle: 6.6 -> 6.7

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.




[calcite] 01/01: [CALCITE-4339] Update Gradle: 6.6 -> 6.7

2020-10-15 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch gradle_67
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit 18faf6fdc55e2153d30927c4136baf4bbeade642
Author: Vladimir Sitnikov 
AuthorDate: Mon Oct 12 23:58:38 2020 +0300

[CALCITE-4339] Update Gradle: 6.6 -> 6.7
---
 gradle/wrapper/gradle-wrapper.properties | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gradle/wrapper/gradle-wrapper.properties 
b/gradle/wrapper/gradle-wrapper.properties
index db14f73..5d03a70 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -16,7 +16,7 @@
 #
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
-distributionSha256Sum=e6f83508f0970452f56197f610d13c5f593baaf43c0e3c6a571e5967be754025
-distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-bin.zip
+distributionSha256Sum=8ad57759019a9233dc7dc4d1a530cefe109dc122000d57f7e623f8cf4ba9dfc4
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists



[calcite] branch master updated: Exclude root project from javadoc aggregate tasks

2020-10-10 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 3957f2a  Exclude root project from javadoc aggregate tasks
3957f2a is described below

commit 3957f2a0e2389a78427953bf49c4448a34526655
Author: Vladimir Sitnikov 
AuthorDate: Sat Oct 10 23:17:41 2020 +0300

Exclude root project from javadoc aggregate tasks
---
 build.gradle.kts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index 9dd6b0c..50d8750 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -142,7 +142,7 @@ val javadocAggregate by tasks.registering(Javadoc::class) {
 group = JavaBasePlugin.DOCUMENTATION_GROUP
 description = "Generates aggregate javadoc for all the artifacts"
 
-val sourceSets = allprojects
+val sourceSets = subprojects
 .mapNotNull { it.extensions.findByType() }
 .map { it.named("main") }
 
@@ -156,7 +156,7 @@ val javadocAggregate by tasks.registering(Javadoc::class) {
 val javadocAggregateIncludingTests by tasks.registering(Javadoc::class) {
 description = "Generates aggregate javadoc for all the artifacts"
 
-val sourceSets = allprojects
+val sourceSets = subprojects
 .mapNotNull { it.extensions.findByType() }
 .flatMap { listOf(it.named("main"), it.named("test")) }
 



[calcite] branch master updated (5a338ff -> 8df4df0)

2020-10-10 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


omit 5a338ff  Revert "Use jackson-bom to specify Jackson versions"
 add 8df4df0  [CALCITE-4324] Avoid sqlline classpath caching by default, 
add sqlline and sqlsh tests

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (5a338ff)
\
 N -- N -- N   refs/heads/master (8df4df0)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

No new revisions were added by this update.

Summary of changes:
 .github/workflows/main.yml| 19 +++
 .ratignore|  1 +
 bom/build.gradle.kts  |  9 ++---
 build.gradle.kts  | 16 +++-
 example/csv/build.gradle.kts  |  7 ++-
 example/csv/sqlline   | 18 --
 example/csv/sqlline.bat   | 17 -
 example/csv/src/test/resources/smoke_test.sql |  3 +++
 sqlline   | 24 ++--
 sqlline.bat   | 16 +++-
 sqlsh | 22 --
 sqlsh.bat | 16 +++-
 12 files changed, 122 insertions(+), 46 deletions(-)
 create mode 100644 example/csv/src/test/resources/smoke_test.sql



[calcite] branch master updated: Revert "Use jackson-bom to specify Jackson versions"

2020-10-09 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 5a338ff  Revert "Use jackson-bom to specify Jackson versions"
5a338ff is described below

commit 5a338ffb1f358e86493e207f77cc94d761cf870d
Author: Vladimir Sitnikov 
AuthorDate: Sat Oct 10 02:54:06 2020 +0300

Revert "Use jackson-bom to specify Jackson versions"

This reverts commit 532f903fe495d741053619c13a51537e57dcd619.
---
 bom/build.gradle.kts | 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts
index 0132f29..ac3a7bb 100644
--- a/bom/build.gradle.kts
+++ b/bom/build.gradle.kts
@@ -38,13 +38,7 @@ fun DependencyConstraintHandlerScope.runtimev(
 ) =
 "runtime"(notation + ":" + versionProp.v)
 
-javaPlatform {
-allowDependencies()
-}
-
 dependencies {
-api(platform("com.fasterxml.jackson:jackson-bom:${"jackson".v}"))
-
 // Parenthesis are needed here: 
https://github.com/gradle/gradle/issues/9248
 (constraints) {
 // api means "the dependency is for both compilation and runtime"
@@ -54,7 +48,10 @@ dependencies {
 apiv("com.beust:jcommander")
 apiv("com.datastax.cassandra:cassandra-driver-core")
 apiv("com.esri.geometry:esri-geometry-api")
+apiv("com.fasterxml.jackson.core:jackson-annotations", "jackson")
+apiv("com.fasterxml.jackson.core:jackson-core", "jackson")
 apiv("com.fasterxml.jackson.core:jackson-databind")
+apiv("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", 
"jackson")
 apiv("com.github.kstyrc:embedded-redis")
 apiv("com.github.stephenc.jcip:jcip-annotations")
 apiv("com.google.code.findbugs:jsr305", "findbugs.jsr305")



[calcite] branch master updated (532f903 -> 4c3ebf8)

2020-10-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 532f903  Use jackson-bom to specify Jackson versions
 add 4c3ebf8  Refactor ResultSetEnumerable to avoid nested lambdas

No new revisions were added by this update.

Summary of changes:
 .../calcite/runtime/ResultSetEnumerable.java   | 70 --
 1 file changed, 37 insertions(+), 33 deletions(-)



[calcite] branch master updated (836202c -> e328a33)

2020-10-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 836202c  [CALCITE-4316] Avoid NPE when nulls are used in divide call
 add e328a33  [CALCITE-4315] NPE in RelMdUtil#checkInputForCollationAndLimit

No new revisions were added by this update.

Summary of changes:
 .../org/apache/calcite/rel/metadata/RelMdUtil.java | 44 +++---
 .../org/apache/calcite/test/RelMetadataTest.java   | 31 +++
 2 files changed, 61 insertions(+), 14 deletions(-)



[calcite] branch master updated (4c3ebf8 -> 836202c)

2020-10-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 4c3ebf8  Refactor ResultSetEnumerable to avoid nested lambdas
 add 836202c  [CALCITE-4316] Avoid NPE when nulls are used in divide call

No new revisions were added by this update.

Summary of changes:
 .../main/java/org/apache/calcite/sql/SqlBinaryOperator.java  | 12 +++-
 .../test/java/org/apache/calcite/test/SqlValidatorTest.java  |  8 
 2 files changed, 19 insertions(+), 1 deletion(-)



[calcite] branch master updated (836202c -> e328a33)

2020-10-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 836202c  [CALCITE-4316] Avoid NPE when nulls are used in divide call
 add e328a33  [CALCITE-4315] NPE in RelMdUtil#checkInputForCollationAndLimit

No new revisions were added by this update.

Summary of changes:
 .../org/apache/calcite/rel/metadata/RelMdUtil.java | 44 +++---
 .../org/apache/calcite/test/RelMetadataTest.java   | 31 +++
 2 files changed, 61 insertions(+), 14 deletions(-)



[calcite] branch master updated (4c3ebf8 -> 836202c)

2020-10-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 4c3ebf8  Refactor ResultSetEnumerable to avoid nested lambdas
 add 836202c  [CALCITE-4316] Avoid NPE when nulls are used in divide call

No new revisions were added by this update.

Summary of changes:
 .../main/java/org/apache/calcite/sql/SqlBinaryOperator.java  | 12 +++-
 .../test/java/org/apache/calcite/test/SqlValidatorTest.java  |  8 
 2 files changed, 19 insertions(+), 1 deletion(-)



[calcite] branch master updated (532f903 -> 4c3ebf8)

2020-10-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 532f903  Use jackson-bom to specify Jackson versions
 add 4c3ebf8  Refactor ResultSetEnumerable to avoid nested lambdas

No new revisions were added by this update.

Summary of changes:
 .../calcite/runtime/ResultSetEnumerable.java   | 70 --
 1 file changed, 37 insertions(+), 33 deletions(-)



[calcite] branch master updated (532f903 -> 4c3ebf8)

2020-10-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 532f903  Use jackson-bom to specify Jackson versions
 add 4c3ebf8  Refactor ResultSetEnumerable to avoid nested lambdas

No new revisions were added by this update.

Summary of changes:
 .../calcite/runtime/ResultSetEnumerable.java   | 70 --
 1 file changed, 37 insertions(+), 33 deletions(-)



[calcite] branch master updated (4c3ebf8 -> 836202c)

2020-10-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 4c3ebf8  Refactor ResultSetEnumerable to avoid nested lambdas
 add 836202c  [CALCITE-4316] Avoid NPE when nulls are used in divide call

No new revisions were added by this update.

Summary of changes:
 .../main/java/org/apache/calcite/sql/SqlBinaryOperator.java  | 12 +++-
 .../test/java/org/apache/calcite/test/SqlValidatorTest.java  |  8 
 2 files changed, 19 insertions(+), 1 deletion(-)



[calcite] branch master updated (836202c -> e328a33)

2020-10-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 836202c  [CALCITE-4316] Avoid NPE when nulls are used in divide call
 add e328a33  [CALCITE-4315] NPE in RelMdUtil#checkInputForCollationAndLimit

No new revisions were added by this update.

Summary of changes:
 .../org/apache/calcite/rel/metadata/RelMdUtil.java | 44 +++---
 .../org/apache/calcite/test/RelMetadataTest.java   | 31 +++
 2 files changed, 61 insertions(+), 14 deletions(-)



[calcite] branch master updated (4c3ebf8 -> 836202c)

2020-10-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 4c3ebf8  Refactor ResultSetEnumerable to avoid nested lambdas
 add 836202c  [CALCITE-4316] Avoid NPE when nulls are used in divide call

No new revisions were added by this update.

Summary of changes:
 .../main/java/org/apache/calcite/sql/SqlBinaryOperator.java  | 12 +++-
 .../test/java/org/apache/calcite/test/SqlValidatorTest.java  |  8 
 2 files changed, 19 insertions(+), 1 deletion(-)



[calcite] branch master updated (836202c -> e328a33)

2020-10-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 836202c  [CALCITE-4316] Avoid NPE when nulls are used in divide call
 add e328a33  [CALCITE-4315] NPE in RelMdUtil#checkInputForCollationAndLimit

No new revisions were added by this update.

Summary of changes:
 .../org/apache/calcite/rel/metadata/RelMdUtil.java | 44 +++---
 .../org/apache/calcite/test/RelMetadataTest.java   | 31 +++
 2 files changed, 61 insertions(+), 14 deletions(-)



[calcite] branch master updated (532f903 -> 4c3ebf8)

2020-10-08 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 532f903  Use jackson-bom to specify Jackson versions
 add 4c3ebf8  Refactor ResultSetEnumerable to avoid nested lambdas

No new revisions were added by this update.

Summary of changes:
 .../calcite/runtime/ResultSetEnumerable.java   | 70 --
 1 file changed, 37 insertions(+), 33 deletions(-)



[calcite] branch master updated: Use jackson-bom to specify Jackson versions

2020-10-07 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 532f903  Use jackson-bom to specify Jackson versions
532f903 is described below

commit 532f903fe495d741053619c13a51537e57dcd619
Author: Vladimir Sitnikov 
AuthorDate: Sun Oct 4 02:33:29 2020 +0300

Use jackson-bom to specify Jackson versions

It enables to configure version constraints for all Jackson modules
at once.
---
 bom/build.gradle.kts | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts
index ac3a7bb..0132f29 100644
--- a/bom/build.gradle.kts
+++ b/bom/build.gradle.kts
@@ -38,7 +38,13 @@ fun DependencyConstraintHandlerScope.runtimev(
 ) =
 "runtime"(notation + ":" + versionProp.v)
 
+javaPlatform {
+allowDependencies()
+}
+
 dependencies {
+api(platform("com.fasterxml.jackson:jackson-bom:${"jackson".v}"))
+
 // Parenthesis are needed here: 
https://github.com/gradle/gradle/issues/9248
 (constraints) {
 // api means "the dependency is for both compilation and runtime"
@@ -48,10 +54,7 @@ dependencies {
 apiv("com.beust:jcommander")
 apiv("com.datastax.cassandra:cassandra-driver-core")
 apiv("com.esri.geometry:esri-geometry-api")
-apiv("com.fasterxml.jackson.core:jackson-annotations", "jackson")
-apiv("com.fasterxml.jackson.core:jackson-core", "jackson")
 apiv("com.fasterxml.jackson.core:jackson-databind")
-apiv("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml", 
"jackson")
 apiv("com.github.kstyrc:embedded-redis")
 apiv("com.github.stephenc.jcip:jcip-annotations")
 apiv("com.google.code.findbugs:jsr305", "findbugs.jsr305")



[calcite] branch master updated (2391c20 -> 1552765)

2020-10-06 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 2391c20  Add 1.26.0 release announcement
 add 36b31ba  [CALCITE-4314] Add Error Prone code style verification
 add 66caa54  [CALCITE-4314] Add missing @Override annotations
 add b5a94de  [CALCITE-4314] Remove unnecessary parentheses
 add d84bb71  [CALCITE-4314] Make abstract class constructors protected 
rather than public
 add 69b12e0  [CALCITE-4314] Suppress HidingField warnings
 add 1b94f37  [CALCITE-4314] Add missing default branches to switch 
statement
 add edbd35a  [CALCITE-4314] Avoid mutable enum fields
 add 11d7594  [CALCITE-4314] Remove unused fields, methods, and variables
 add 5628311  [CALCITE-4314] Avoid escaping HTML entities in JavaDoc code 
blocks
 add 1435ed5  [CALCITE-4314] Avoid returning mutable and non-mutable lists 
from the same method
 add 04f8a07  [CALCITE-4314] Avoid long = int + int in 
EnumerableDefaults.orderBy
 add 0cdb485  [CALCITE-4314] Use exact parameter names in JavaDoc
 add b88bae9  [CALCITE-4314] Avoid Collection.equals(...) usage as its 
behavior is not specified
 add c528771  [CALCITE-4314] Replace SortedSet with NavigableSet
 add 2cbb0c4  [CALCITE-4314] Replace protected methods in final classes 
with package-private
 add 995b90b  [CALCITE-4314] Suppress warnings on Guava's @Beta API usage
 add 042802f  [CALCITE-4314] Make inner classes static when possible
 add 4dd81e9  [CALCITE-4314] Avoid MissingCasesInEnumSwitch
 add cff3695  [CALCITE-4314] Replace LinkedList with ArrayList, ArrayDeque, 
HashSet
 add 3fa4bf1  [CALCITE-4314] Suppress JdkObsolete warning for Date usage 
when used in converters
 add 6917193  [CALCITE-4314] Suppress MutablePublicArray in Cassandra and 
Mongo adapters
 add e537246  [CALCITE-4314] Suppress JdkObsolete for Stack usage
 add 5be8a9a  [CALCITE-4314] Correct (@link javadoc tag for 
SqlStdOperatorTable#OVER
 add 122db54  [CALCITE-4314] Use canonical class references
 add cafe7ec  [CALCITE-4314] Resolve ProtectedMembersInFinalClass
 add fe7c1f5  [CALCITE-4314] Avoid importing of common names
 add 2235149  [CALCITE-4314] Suppress WaitNotInLoop for Unsafe
 add 179ccca  [CALCITE-4314] Suppress NonOverridingEquals
 add c0ee886  [CALCITE-4314] Avoid misleading fall through
 add 13c58ef  [CALCITE-4314] Align the order of parameters and arguments in 
WinAggResetContextImpl
 add be6fc6f  [CALCITE-4314] Escape quote in labels when printing RelNode 
in Dot format
 add 0024fdb  [CALCITE-4314] Avoid Map modification in forEcah loop
 add 5092095  [CALCITE-4314] Avoid excessive lambdas in SemiJoinRule
 add 5bf678e  [CALCITE-4314] Use ThreadLocal for SimpleDateFormat in 
DruidJson
 add 1552765  [CALCITE-4314] Suppress the current CatchAndPrintStackTrace, 
MissingSummary, etc

No new revisions were added by this update.

Summary of changes:
 .github/workflows/main.yml |  18 +
 build.gradle.kts   |  37 +-
 .../adapter/cassandra/CassandraEnumerator.java |  12 +-
 .../calcite/adapter/cassandra/CassandraFilter.java |   4 +-
 .../calcite/adapter/cassandra/CassandraLimit.java  |   4 +-
 .../calcite/adapter/cassandra/CassandraMethod.java |   1 +
 .../adapter/cassandra/CassandraProject.java|   4 +-
 .../calcite/adapter/cassandra/CassandraRules.java  |  12 +-
 .../adapter/cassandra/CassandraSchemaFactory.java  |   2 +-
 .../calcite/adapter/cassandra/CassandraSort.java   |   2 +-
 .../calcite/adapter/cassandra/CassandraTable.java  |  12 +-
 .../adapter/cassandra/CassandraTableScan.java  |   2 +-
 .../cassandra/CassandraToEnumerableConverter.java  |   2 +-
 .../apache/calcite/adapter/clone/ArrayTable.java   | 160 
 .../apache/calcite/adapter/clone/CloneSchema.java  |   2 +-
 .../apache/calcite/adapter/clone/ColumnLoader.java |  23 +-
 .../apache/calcite/adapter/clone/ListTable.java|  16 +-
 .../calcite/adapter/enumerable/EnumUtils.java  |  26 +-
 .../adapter/enumerable/EnumerableAggregate.java|   2 +-
 .../enumerable/EnumerableAggregateBase.java|  24 +-
 .../adapter/enumerable/EnumerableBindable.java |   6 +-
 .../calcite/adapter/enumerable/EnumerableCalc.java |   4 +-
 .../adapter/enumerable/EnumerableCollect.java  |   2 +-
 .../adapter/enumerable/EnumerableConvention.java   |  16 +-
 .../adapter/enumerable/EnumerableCorrelate.java|   2 +-
 .../adapter/enumerable/EnumerableFilter.java   |   4 +-
 .../enumerable/EnumerableInterpretable.java|  18 +-
 .../adapter/enumerable/EnumerableInterpreter.java  |   2 +-
 .../adapter/enumerable/EnumerableIntersect.java|   4 +-
 .../adapter/enumerable/EnumerableLimit.java|   2 +-
 .../adapter/enumerable/EnumerableMatch.java|   7 +-
 .../adapter/enumerable

[calcite] branch master updated (8a7e1be -> 3cc793a)

2020-10-01 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 8a7e1be  [CALCITE-4300] EnumerableBatchNestedLoopJoin dynamic code 
generation can lead to variable name issues if two EBNLJ are nested
 add 92ea5a2  [CALCITE-4215] Ensure org.apache.calcite.schema.Statistic 
uses null vs emptyList appropriately
 add ec5b75a  [CALCITE-4215] Avoid NPE in RelOptTableImpl.getMonotonicity 
when collations is null
 add 97e4f0c  [CALCITE-4215] Use default trait value if traitSupplier 
returns null
 add 2f1d764  [CALCITE-4215] Avoid NPE in RelMdCollation from 
ImmutableList.copyOf
 add 4787123  [CALCITE-4215] Avoid NPE in RelFieldTrimmer when collations 
is null
 add 58adcae  [CALCITE-4215] Avoid NPE when monotonicity returns null
 add 1f57bd4  [CALCITE-4215] Avoid NPE when getReferentialConstraints() 
returns null
 add 0922441  [CALCITE-4215] Fix handing of null monotonicity in 
IdentifierNamespace
 add 7df9bba  [CALCITE-4215] Avoid NPE when monotonicity is null
 add 3cc793a  [CALCITE-4215] Handle nulls in RelMdCollation#enumerableJoin0

No new revisions were added by this update.

Summary of changes:
 .../calcite/adapter/java/ReflectiveSchema.java |  8 +++-
 .../java/org/apache/calcite/plan/RelTraitSet.java  |  8 +++-
 .../apache/calcite/prepare/RelOptTableImpl.java|  6 ++-
 .../calcite/rel/metadata/RelMdCollation.java   | 41 ++---
 .../rules/materialize/MaterializedViewRule.java|  3 ++
 .../java/org/apache/calcite/schema/Statistic.java  | 24 +++---
 .../java/org/apache/calcite/schema/Statistics.java | 53 ++
 .../org/apache/calcite/sql/SqlBinaryOperator.java  |  3 ++
 .../org/apache/calcite/sql/SqlPrefixOperator.java  |  3 +-
 .../apache/calcite/sql/fun/SqlExtractFunction.java |  3 +-
 .../apache/calcite/sql/fun/SqlFloorFunction.java   |  3 +-
 .../sql/fun/SqlMonotonicBinaryOperator.java|  4 ++
 .../calcite/sql/fun/SqlSubstringFunction.java  |  3 +-
 .../calcite/sql/validate/IdentifierNamespace.java  |  2 +-
 .../calcite/sql/validate/SqlValidatorUtil.java |  3 +-
 .../apache/calcite/sql2rel/RelFieldTrimmer.java|  8 ++--
 .../rel/rel2sql/RelToSqlConverterStructsTest.java  | 25 --
 17 files changed, 102 insertions(+), 98 deletions(-)



[calcite] branch master updated (8a7e1be -> 3cc793a)

2020-10-01 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 8a7e1be  [CALCITE-4300] EnumerableBatchNestedLoopJoin dynamic code 
generation can lead to variable name issues if two EBNLJ are nested
 add 92ea5a2  [CALCITE-4215] Ensure org.apache.calcite.schema.Statistic 
uses null vs emptyList appropriately
 add ec5b75a  [CALCITE-4215] Avoid NPE in RelOptTableImpl.getMonotonicity 
when collations is null
 add 97e4f0c  [CALCITE-4215] Use default trait value if traitSupplier 
returns null
 add 2f1d764  [CALCITE-4215] Avoid NPE in RelMdCollation from 
ImmutableList.copyOf
 add 4787123  [CALCITE-4215] Avoid NPE in RelFieldTrimmer when collations 
is null
 add 58adcae  [CALCITE-4215] Avoid NPE when monotonicity returns null
 add 1f57bd4  [CALCITE-4215] Avoid NPE when getReferentialConstraints() 
returns null
 add 0922441  [CALCITE-4215] Fix handing of null monotonicity in 
IdentifierNamespace
 add 7df9bba  [CALCITE-4215] Avoid NPE when monotonicity is null
 add 3cc793a  [CALCITE-4215] Handle nulls in RelMdCollation#enumerableJoin0

No new revisions were added by this update.

Summary of changes:
 .../calcite/adapter/java/ReflectiveSchema.java |  8 +++-
 .../java/org/apache/calcite/plan/RelTraitSet.java  |  8 +++-
 .../apache/calcite/prepare/RelOptTableImpl.java|  6 ++-
 .../calcite/rel/metadata/RelMdCollation.java   | 41 ++---
 .../rules/materialize/MaterializedViewRule.java|  3 ++
 .../java/org/apache/calcite/schema/Statistic.java  | 24 +++---
 .../java/org/apache/calcite/schema/Statistics.java | 53 ++
 .../org/apache/calcite/sql/SqlBinaryOperator.java  |  3 ++
 .../org/apache/calcite/sql/SqlPrefixOperator.java  |  3 +-
 .../apache/calcite/sql/fun/SqlExtractFunction.java |  3 +-
 .../apache/calcite/sql/fun/SqlFloorFunction.java   |  3 +-
 .../sql/fun/SqlMonotonicBinaryOperator.java|  4 ++
 .../calcite/sql/fun/SqlSubstringFunction.java  |  3 +-
 .../calcite/sql/validate/IdentifierNamespace.java  |  2 +-
 .../calcite/sql/validate/SqlValidatorUtil.java |  3 +-
 .../apache/calcite/sql2rel/RelFieldTrimmer.java|  8 ++--
 .../rel/rel2sql/RelToSqlConverterStructsTest.java  | 25 --
 17 files changed, 102 insertions(+), 98 deletions(-)



[calcite] branch master updated (8a7e1be -> 3cc793a)

2020-10-01 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 8a7e1be  [CALCITE-4300] EnumerableBatchNestedLoopJoin dynamic code 
generation can lead to variable name issues if two EBNLJ are nested
 add 92ea5a2  [CALCITE-4215] Ensure org.apache.calcite.schema.Statistic 
uses null vs emptyList appropriately
 add ec5b75a  [CALCITE-4215] Avoid NPE in RelOptTableImpl.getMonotonicity 
when collations is null
 add 97e4f0c  [CALCITE-4215] Use default trait value if traitSupplier 
returns null
 add 2f1d764  [CALCITE-4215] Avoid NPE in RelMdCollation from 
ImmutableList.copyOf
 add 4787123  [CALCITE-4215] Avoid NPE in RelFieldTrimmer when collations 
is null
 add 58adcae  [CALCITE-4215] Avoid NPE when monotonicity returns null
 add 1f57bd4  [CALCITE-4215] Avoid NPE when getReferentialConstraints() 
returns null
 add 0922441  [CALCITE-4215] Fix handing of null monotonicity in 
IdentifierNamespace
 add 7df9bba  [CALCITE-4215] Avoid NPE when monotonicity is null
 add 3cc793a  [CALCITE-4215] Handle nulls in RelMdCollation#enumerableJoin0

No new revisions were added by this update.

Summary of changes:
 .../calcite/adapter/java/ReflectiveSchema.java |  8 +++-
 .../java/org/apache/calcite/plan/RelTraitSet.java  |  8 +++-
 .../apache/calcite/prepare/RelOptTableImpl.java|  6 ++-
 .../calcite/rel/metadata/RelMdCollation.java   | 41 ++---
 .../rules/materialize/MaterializedViewRule.java|  3 ++
 .../java/org/apache/calcite/schema/Statistic.java  | 24 +++---
 .../java/org/apache/calcite/schema/Statistics.java | 53 ++
 .../org/apache/calcite/sql/SqlBinaryOperator.java  |  3 ++
 .../org/apache/calcite/sql/SqlPrefixOperator.java  |  3 +-
 .../apache/calcite/sql/fun/SqlExtractFunction.java |  3 +-
 .../apache/calcite/sql/fun/SqlFloorFunction.java   |  3 +-
 .../sql/fun/SqlMonotonicBinaryOperator.java|  4 ++
 .../calcite/sql/fun/SqlSubstringFunction.java  |  3 +-
 .../calcite/sql/validate/IdentifierNamespace.java  |  2 +-
 .../calcite/sql/validate/SqlValidatorUtil.java |  3 +-
 .../apache/calcite/sql2rel/RelFieldTrimmer.java|  8 ++--
 .../rel/rel2sql/RelToSqlConverterStructsTest.java  | 25 --
 17 files changed, 102 insertions(+), 98 deletions(-)



[calcite] branch master updated (8a7e1be -> 3cc793a)

2020-10-01 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 8a7e1be  [CALCITE-4300] EnumerableBatchNestedLoopJoin dynamic code 
generation can lead to variable name issues if two EBNLJ are nested
 add 92ea5a2  [CALCITE-4215] Ensure org.apache.calcite.schema.Statistic 
uses null vs emptyList appropriately
 add ec5b75a  [CALCITE-4215] Avoid NPE in RelOptTableImpl.getMonotonicity 
when collations is null
 add 97e4f0c  [CALCITE-4215] Use default trait value if traitSupplier 
returns null
 add 2f1d764  [CALCITE-4215] Avoid NPE in RelMdCollation from 
ImmutableList.copyOf
 add 4787123  [CALCITE-4215] Avoid NPE in RelFieldTrimmer when collations 
is null
 add 58adcae  [CALCITE-4215] Avoid NPE when monotonicity returns null
 add 1f57bd4  [CALCITE-4215] Avoid NPE when getReferentialConstraints() 
returns null
 add 0922441  [CALCITE-4215] Fix handing of null monotonicity in 
IdentifierNamespace
 add 7df9bba  [CALCITE-4215] Avoid NPE when monotonicity is null
 add 3cc793a  [CALCITE-4215] Handle nulls in RelMdCollation#enumerableJoin0

No new revisions were added by this update.

Summary of changes:
 .../calcite/adapter/java/ReflectiveSchema.java |  8 +++-
 .../java/org/apache/calcite/plan/RelTraitSet.java  |  8 +++-
 .../apache/calcite/prepare/RelOptTableImpl.java|  6 ++-
 .../calcite/rel/metadata/RelMdCollation.java   | 41 ++---
 .../rules/materialize/MaterializedViewRule.java|  3 ++
 .../java/org/apache/calcite/schema/Statistic.java  | 24 +++---
 .../java/org/apache/calcite/schema/Statistics.java | 53 ++
 .../org/apache/calcite/sql/SqlBinaryOperator.java  |  3 ++
 .../org/apache/calcite/sql/SqlPrefixOperator.java  |  3 +-
 .../apache/calcite/sql/fun/SqlExtractFunction.java |  3 +-
 .../apache/calcite/sql/fun/SqlFloorFunction.java   |  3 +-
 .../sql/fun/SqlMonotonicBinaryOperator.java|  4 ++
 .../calcite/sql/fun/SqlSubstringFunction.java  |  3 +-
 .../calcite/sql/validate/IdentifierNamespace.java  |  2 +-
 .../calcite/sql/validate/SqlValidatorUtil.java |  3 +-
 .../apache/calcite/sql2rel/RelFieldTrimmer.java|  8 ++--
 .../rel/rel2sql/RelToSqlConverterStructsTest.java  | 25 --
 17 files changed, 102 insertions(+), 98 deletions(-)



[calcite] branch master updated: Make project buildable from folders that include special characters

2020-09-30 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 5fd65a6  Make project buildable from folders that include special 
characters
5fd65a6 is described below

commit 5fd65a6b91bb123362c00d34a44b1bd6ae847a5b
Author: Vladimir Sitnikov 
AuthorDate: Wed Sep 30 22:08:10 2020 +0300

Make project buildable from folders that include special characters

String inside fmpp's tdd(...) expression needs quoting
---
 .../org/apache/calcite/buildtools/fmpp/FmppTask.kt  | 17 +
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git 
a/buildSrc/subprojects/fmpp/src/main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt
 
b/buildSrc/subprojects/fmpp/src/main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt
index b968092..f591d7e 100644
--- 
a/buildSrc/subprojects/fmpp/src/main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt
+++ 
b/buildSrc/subprojects/fmpp/src/main/kotlin/org/apache/calcite/buildtools/fmpp/FmppTask.kt
@@ -52,19 +52,28 @@ open class FmppTask @Inject constructor(
 val output = objectFactory.directoryProperty()
 .convention(project.layout.buildDirectory.dir("fmpp/$name"))
 
+/**
+ * Path might contain spaces and TDD special characters, so it needs to be 
quoted.
+ * See http://fmpp.sourceforge.net/tdd.html
+ */
+private fun String.tddString() =
+"\"${toString().replace("\\", "").replace("\"", "\\\"")}\""
+
 @TaskAction
 fun run() {
 project.delete(output.asFileTree)
 ant.withGroovyBuilder {
-"taskdef"("name" to "fmpp",
+"taskdef"(
+"name" to "fmpp",
 "classname" to "fmpp.tools.AntTask",
-"classpath" to fmppClasspath.get().asPath)
+"classpath" to fmppClasspath.get().asPath
+)
 "fmpp"(
 "configuration" to config.get(),
 "sourceRoot" to templates.get().asFile,
 "outputRoot" to output.get().asFile,
-"data" to "tdd(" + config.get() + "), " +
-"default: tdd(" + templates.get().asFile + 
"/../default_config.fmpp)"
+"data" to "tdd(" + config.get().toString().tddString() + "), " 
+
+"default: tdd(" + 
"${templates.get().asFile}/../default_config.fmpp".tddString() + ")"
 )
 }
 }



[calcite] 02/02: Simplify Pair.left(Iterable) and Pair.right(Iterable) implementation

2020-09-30 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit 539807bb0558890c2a92d0fc2af20c741a775fbc
Author: Vladimir Sitnikov 
AuthorDate: Sun Sep 27 18:30:53 2020 +0300

Simplify Pair.left(Iterable) and Pair.right(Iterable) implementation
---
 .../main/java/org/apache/calcite/util/Pair.java| 80 +++---
 1 file changed, 8 insertions(+), 72 deletions(-)

diff --git a/core/src/main/java/org/apache/calcite/util/Pair.java 
b/core/src/main/java/org/apache/calcite/util/Pair.java
index 26fa8cf..4c71bf5 100644
--- a/core/src/main/java/org/apache/calcite/util/Pair.java
+++ b/core/src/main/java/org/apache/calcite/util/Pair.java
@@ -286,8 +286,8 @@ public class Pair
* @return Iterable over the left elements
*/
   public static  Iterable left(
-  final Iterable> iterable) {
-return () -> new LeftIterator<>(iterable.iterator());
+  final Iterable> iterable) {
+return Util.transform(iterable, Map.Entry::getKey);
   }
 
   /**
@@ -299,34 +299,18 @@ public class Pair
* @return Iterable over the right elements
*/
   public static  Iterable right(
-  final Iterable> iterable) {
-return () -> new RightIterator<>(iterable.iterator());
+  final Iterable> iterable) {
+return Util.transform(iterable, Map.Entry::getValue);
   }
 
   public static  List left(
-  final List> pairs) {
-return new AbstractList() {
-  public K get(int index) {
-return pairs.get(index).getKey();
-  }
-
-  public int size() {
-return pairs.size();
-  }
-};
+  final List> pairs) {
+return Util.transform(pairs, Map.Entry::getKey);
   }
 
   public static  List right(
-  final List> pairs) {
-return new AbstractList() {
-  public V get(int index) {
-return pairs.get(index).getValue();
-  }
-
-  public int size() {
-return pairs.size();
-  }
-};
+  final List> pairs) {
+return Util.transform(pairs, Map.Entry::getValue);
   }
 
   /**
@@ -369,54 +353,6 @@ public class Pair
 };
   }
 
-  /** Iterator that returns the left field of each pair.
-   *
-   * @param  Left-hand type
-   * @param  Right-hand type */
-  private static class LeftIterator implements Iterator {
-private final Iterator> iterator;
-
-LeftIterator(Iterator> iterator) {
-  this.iterator = Objects.requireNonNull(iterator);
-}
-
-public boolean hasNext() {
-  return iterator.hasNext();
-}
-
-public L next() {
-  return iterator.next().getKey();
-}
-
-public void remove() {
-  iterator.remove();
-}
-  }
-
-  /** Iterator that returns the right field of each pair.
-   *
-   * @param  Left-hand type
-   * @param  Right-hand type */
-  private static class RightIterator implements Iterator {
-private final Iterator> iterator;
-
-RightIterator(Iterator> iterator) {
-  this.iterator = Objects.requireNonNull(iterator);
-}
-
-public boolean hasNext() {
-  return iterator.hasNext();
-}
-
-public R next() {
-  return iterator.next().getValue();
-}
-
-public void remove() {
-  iterator.remove();
-}
-  }
-
   /** Iterator that returns the first element of a collection paired with every
* other element.
*



[calcite] branch master updated (90ccbb0 -> 539807b)

2020-09-30 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 90ccbb0  [CALCITE-4216] Make 
org.apache.calcite.rel.type.RelDataType#getFamily non-nullable
 new a79dde6  [CALCITE-4280] Replace Guava's Lists.transform and 
Iterables.transform with Util.transform
 new 539807b  Simplify Pair.left(Iterable) and Pair.right(Iterable) 
implementation

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../cassandra/CassandraToEnumerableConverter.java  |   5 +-
 .../apache/calcite/adapter/clone/ColumnLoader.java |   9 +-
 .../calcite/adapter/enumerable/EnumerableCalc.java |   5 +-
 .../adapter/enumerable/EnumerableUnionRule.java|   5 +-
 .../org/apache/calcite/adapter/jdbc/JdbcTable.java |   4 +-
 .../org/apache/calcite/interpreter/SortNode.java   |   4 +-
 .../org/apache/calcite/materialize/Lattice.java|   9 +-
 .../apache/calcite/materialize/LatticeSpace.java   |   3 +-
 .../calcite/materialize/LatticeSuggester.java  |   3 +-
 .../materialize/MaterializationService.java|   3 +-
 .../calcite/plan/RelOptMaterializations.java   |   4 +-
 .../java/org/apache/calcite/plan/RelOptRule.java   |   3 +-
 .../java/org/apache/calcite/plan/RelOptUtil.java   |   4 +-
 .../org/apache/calcite/profile/ProfilerImpl.java   |   2 +-
 .../org/apache/calcite/profile/SimpleProfiler.java |   4 +-
 .../java/org/apache/calcite/rel/RelCollations.java |   3 +-
 .../java/org/apache/calcite/rel/core/Project.java  |   3 +-
 .../org/apache/calcite/rel/core/RepeatUnion.java   |   4 +-
 .../java/org/apache/calcite/rel/core/SetOp.java|   3 +-
 .../java/org/apache/calcite/rel/core/Sort.java |   4 +-
 .../calcite/rel/metadata/RelMdAllPredicates.java   |  14 +--
 .../rel/metadata/RelMdColumnUniqueness.java|   4 +-
 .../rel/metadata/RelMdExpressionLineage.java   |   3 +-
 .../calcite/rel/metadata/RelMdUniqueKeys.java  |  11 +-
 .../calcite/rel/mutable/MutableMultiRel.java   |   5 +-
 .../apache/calcite/rel/mutable/MutableRels.java|   4 +-
 .../calcite/rel/rel2sql/RelToSqlConverter.java |   6 +-
 .../rel/rules/AggregateExtractProjectRule.java |   4 +-
 .../rel/rules/AggregateProjectMergeRule.java   |   4 +-
 .../calcite/rel/rules/ProjectToWindowRule.java |   5 +-
 .../java/org/apache/calcite/rex/RexAnalyzer.java   |   4 +-
 .../java/org/apache/calcite/rex/RexBuilder.java|   3 +-
 .../main/java/org/apache/calcite/rex/RexUtil.java  |  16 +--
 .../java/org/apache/calcite/schema/Schemas.java|   5 +-
 .../java/org/apache/calcite/sql/SqlIdentifier.java |   5 +-
 .../apache/calcite/sql/parser/SqlParserPos.java|  14 +--
 .../org/apache/calcite/sql/validate/ListScope.java |   5 +-
 .../sql/validate/SqlUserDefinedFunction.java   |   5 +-
 .../sql/validate/SqlUserDefinedTableMacro.java |   5 +-
 .../calcite/sql/validate/SqlValidatorScope.java|   4 +-
 .../calcite/sql/validate/SqlValidatorUtil.java |   7 +-
 .../apache/calcite/sql2rel/RelDecorrelator.java|   2 +-
 .../apache/calcite/sql2rel/RelFieldTrimmer.java|   8 +-
 .../apache/calcite/sql2rel/SqlToRelConverter.java  |   2 +-
 .../java/org/apache/calcite/tools/Programs.java|   4 +-
 .../org/apache/calcite/util/ImmutableBitSet.java   |   5 +-
 .../apache/calcite/util/ImmutableNullableSet.java  |   2 +-
 .../main/java/org/apache/calcite/util/Pair.java|  80 ++
 .../main/java/org/apache/calcite/util/Util.java| 123 +++--
 .../org/apache/calcite/util/mapping/IntPair.java   |   9 +-
 .../org/apache/calcite/util/mapping/Mappings.java  |   3 +-
 .../java/org/apache/calcite/test/QuidemTest.java   |   3 +-
 .../calcite/adapter/druid/DruidDateTimeUtils.java  |   3 +-
 .../apache/calcite/adapter/druid/DruidQuery.java   |   3 +-
 .../geode/rel/GeodeToEnumerableConverter.java  |   5 +-
 .../linq4j/tree/ConstructorDeclaration.java|   7 +-
 .../calcite/linq4j/tree/MethodDeclaration.java |   5 +-
 .../mongodb/MongoToEnumerableConverter.java|   5 +-
 src/main/config/forbidden-apis/signatures.txt  |   8 +-
 59 files changed, 221 insertions(+), 273 deletions(-)



[calcite] 01/02: [CALCITE-4280] Replace Guava's Lists.transform and Iterables.transform with Util.transform

2020-09-30 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit a79dde6383325bc34bc3d92ee32176c59579221a
Author: Vladimir Sitnikov 
AuthorDate: Sat Sep 26 17:54:58 2020 +0300

[CALCITE-4280] Replace Guava's Lists.transform and Iterables.transform with 
Util.transform
---
 .../cassandra/CassandraToEnumerableConverter.java  |   5 +-
 .../apache/calcite/adapter/clone/ColumnLoader.java |   9 +-
 .../calcite/adapter/enumerable/EnumerableCalc.java |   5 +-
 .../adapter/enumerable/EnumerableUnionRule.java|   5 +-
 .../org/apache/calcite/adapter/jdbc/JdbcTable.java |   4 +-
 .../org/apache/calcite/interpreter/SortNode.java   |   4 +-
 .../org/apache/calcite/materialize/Lattice.java|   9 +-
 .../apache/calcite/materialize/LatticeSpace.java   |   3 +-
 .../calcite/materialize/LatticeSuggester.java  |   3 +-
 .../materialize/MaterializationService.java|   3 +-
 .../calcite/plan/RelOptMaterializations.java   |   4 +-
 .../java/org/apache/calcite/plan/RelOptRule.java   |   3 +-
 .../java/org/apache/calcite/plan/RelOptUtil.java   |   4 +-
 .../org/apache/calcite/profile/ProfilerImpl.java   |   2 +-
 .../org/apache/calcite/profile/SimpleProfiler.java |   4 +-
 .../java/org/apache/calcite/rel/RelCollations.java |   3 +-
 .../java/org/apache/calcite/rel/core/Project.java  |   3 +-
 .../org/apache/calcite/rel/core/RepeatUnion.java   |   4 +-
 .../java/org/apache/calcite/rel/core/SetOp.java|   3 +-
 .../java/org/apache/calcite/rel/core/Sort.java |   4 +-
 .../calcite/rel/metadata/RelMdAllPredicates.java   |  14 +--
 .../rel/metadata/RelMdColumnUniqueness.java|   4 +-
 .../rel/metadata/RelMdExpressionLineage.java   |   3 +-
 .../calcite/rel/metadata/RelMdUniqueKeys.java  |  11 +-
 .../calcite/rel/mutable/MutableMultiRel.java   |   5 +-
 .../apache/calcite/rel/mutable/MutableRels.java|   4 +-
 .../calcite/rel/rel2sql/RelToSqlConverter.java |   6 +-
 .../rel/rules/AggregateExtractProjectRule.java |   4 +-
 .../rel/rules/AggregateProjectMergeRule.java   |   4 +-
 .../calcite/rel/rules/ProjectToWindowRule.java |   5 +-
 .../java/org/apache/calcite/rex/RexAnalyzer.java   |   4 +-
 .../java/org/apache/calcite/rex/RexBuilder.java|   3 +-
 .../main/java/org/apache/calcite/rex/RexUtil.java  |  16 +--
 .../java/org/apache/calcite/schema/Schemas.java|   5 +-
 .../java/org/apache/calcite/sql/SqlIdentifier.java |   5 +-
 .../apache/calcite/sql/parser/SqlParserPos.java|  14 +--
 .../org/apache/calcite/sql/validate/ListScope.java |   5 +-
 .../sql/validate/SqlUserDefinedFunction.java   |   5 +-
 .../sql/validate/SqlUserDefinedTableMacro.java |   5 +-
 .../calcite/sql/validate/SqlValidatorScope.java|   4 +-
 .../calcite/sql/validate/SqlValidatorUtil.java |   7 +-
 .../apache/calcite/sql2rel/RelDecorrelator.java|   2 +-
 .../apache/calcite/sql2rel/RelFieldTrimmer.java|   8 +-
 .../apache/calcite/sql2rel/SqlToRelConverter.java  |   2 +-
 .../java/org/apache/calcite/tools/Programs.java|   4 +-
 .../org/apache/calcite/util/ImmutableBitSet.java   |   5 +-
 .../apache/calcite/util/ImmutableNullableSet.java  |   2 +-
 .../main/java/org/apache/calcite/util/Util.java| 123 +++--
 .../org/apache/calcite/util/mapping/IntPair.java   |   9 +-
 .../org/apache/calcite/util/mapping/Mappings.java  |   3 +-
 .../java/org/apache/calcite/test/QuidemTest.java   |   3 +-
 .../calcite/adapter/druid/DruidDateTimeUtils.java  |   3 +-
 .../apache/calcite/adapter/druid/DruidQuery.java   |   3 +-
 .../geode/rel/GeodeToEnumerableConverter.java  |   5 +-
 .../linq4j/tree/ConstructorDeclaration.java|   7 +-
 .../calcite/linq4j/tree/MethodDeclaration.java |   5 +-
 .../mongodb/MongoToEnumerableConverter.java|   5 +-
 src/main/config/forbidden-apis/signatures.txt  |   8 +-
 58 files changed, 213 insertions(+), 201 deletions(-)

diff --git 
a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraToEnumerableConverter.java
 
b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraToEnumerableConverter.java
index 45f6f07..111d48e 100644
--- 
a/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraToEnumerableConverter.java
+++ 
b/cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraToEnumerableConverter.java
@@ -38,8 +38,7 @@ import org.apache.calcite.rel.type.RelDataType;
 import org.apache.calcite.runtime.Hook;
 import org.apache.calcite.util.BuiltInMethod;
 import org.apache.calcite.util.Pair;
-
-import com.google.common.collect.Lists;
+import org.apache.calcite.util.Util;
 
 import java.util.AbstractList;
 import java.util.ArrayList;
@@ -143,6 +142,6 @@ public class CassandraToEnumerableConverter
   /** E.g. {@code constantList("x", "y")} returns
* {@code {ConstantExpression("x"), ConstantEx

[calcite] branch master updated: [CALCITE-4216] Make org.apache.calcite.rel.type.RelDataType#getFamily non-nullable

2020-09-30 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 90ccbb0  [CALCITE-4216] Make 
org.apache.calcite.rel.type.RelDataType#getFamily non-nullable
90ccbb0 is described below

commit 90ccbb01ae3060def7ad73bbd5af45b6c1a64b99
Author: Vladimir Sitnikov 
AuthorDate: Wed Sep 2 00:31:51 2020 +0300

[CALCITE-4216] Make org.apache.calcite.rel.type.RelDataType#getFamily 
non-nullable
---
 .../java/org/apache/calcite/rel/type/RelDataType.java|  2 +-
 .../org/apache/calcite/sql/type/AbstractSqlType.java | 16 +++-
 .../java/org/apache/calcite/sql/type/ObjectSqlType.java  | 15 ++-
 3 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/core/src/main/java/org/apache/calcite/rel/type/RelDataType.java 
b/core/src/main/java/org/apache/calcite/rel/type/RelDataType.java
index 47b1bc2..07223dc 100644
--- a/core/src/main/java/org/apache/calcite/rel/type/RelDataType.java
+++ b/core/src/main/java/org/apache/calcite/rel/type/RelDataType.java
@@ -223,7 +223,7 @@ public interface RelDataType {
* Gets a canonical object representing the family of this type. Two values
* can be compared if and only if their types are in the same family.
*
-   * @return canonical object representing type family
+   * @return canonical object representing type family, never null
*/
   RelDataTypeFamily getFamily();
 
diff --git 
a/core/src/main/java/org/apache/calcite/sql/type/AbstractSqlType.java 
b/core/src/main/java/org/apache/calcite/sql/type/AbstractSqlType.java
index e75bdb7..25013b3 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/AbstractSqlType.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/AbstractSqlType.java
@@ -57,23 +57,21 @@ public abstract class AbstractSqlType
 
   //~ Methods 
 
-  // implement RelDataType
-  public SqlTypeName getSqlTypeName() {
+  @Override public SqlTypeName getSqlTypeName() {
 return typeName;
   }
 
-  // implement RelDataType
-  public boolean isNullable() {
+  @Override public boolean isNullable() {
 return isNullable;
   }
 
-  // implement RelDataType
-  public RelDataTypeFamily getFamily() {
-return typeName.getFamily();
+  @Override public RelDataTypeFamily getFamily() {
+SqlTypeFamily family = typeName.getFamily();
+// If typename does not have family, treat the current type as the only 
member its family
+return family != null ? family : this;
   }
 
-  // implement RelDataType
-  public RelDataTypePrecedenceList getPrecedenceList() {
+  @Override public RelDataTypePrecedenceList getPrecedenceList() {
 RelDataTypePrecedenceList list =
 SqlTypeExplicitPrecedenceList.getListForType(this);
 if (list != null) {
diff --git a/core/src/main/java/org/apache/calcite/sql/type/ObjectSqlType.java 
b/core/src/main/java/org/apache/calcite/sql/type/ObjectSqlType.java
index 2cf929e..e5901ca 100644
--- a/core/src/main/java/org/apache/calcite/sql/type/ObjectSqlType.java
+++ b/core/src/main/java/org/apache/calcite/sql/type/ObjectSqlType.java
@@ -65,26 +65,23 @@ public class ObjectSqlType extends AbstractSqlType {
 this.family = family;
   }
 
-  // implement RelDataType
-  public RelDataTypeComparability getComparability() {
+  @Override public RelDataTypeComparability getComparability() {
 return comparability;
   }
 
-  // override AbstractSqlType
-  public SqlIdentifier getSqlIdentifier() {
+  @Override public SqlIdentifier getSqlIdentifier() {
 return sqlIdentifier;
   }
 
-  // override AbstractSqlType
-  public RelDataTypeFamily getFamily() {
+  @Override public RelDataTypeFamily getFamily() {
 // each UDT is in its own lonely family, until one day when
 // we support inheritance (at which time also need to implement
 // getPrecedenceList).
-return family;
+RelDataTypeFamily family = this.family;
+return family != null ? family : this;
   }
 
-  // implement RelDataTypeImpl
-  protected void generateTypeString(StringBuilder sb, boolean withDetail) {
+  @Override protected void generateTypeString(StringBuilder sb, boolean 
withDetail) {
 // TODO jvs 10-Feb-2005:  proper quoting; dump attributes withDetail?
 sb.append("ObjectSqlType(");
 sb.append(sqlIdentifier.toString());



[calcite] branch master updated: [CALCITE-4288] Create SqlTypeUtil#deriveType(SqlCallBinding) to make type computation simpler

2020-09-30 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 14d5e3b  [CALCITE-4288] Create SqlTypeUtil#deriveType(SqlCallBinding) 
to make type computation simpler
14d5e3b is described below

commit 14d5e3b0dfdba70a24cb5486275a1c973efa347c
Author: Vladimir Sitnikov 
AuthorDate: Sun Sep 27 21:45:26 2020 +0300

[CALCITE-4288] Create SqlTypeUtil#deriveType(SqlCallBinding) to make type 
computation simpler
---
 .../org/apache/calcite/sql/SqlCallBinding.java | 12 ++--
 .../apache/calcite/sql/fun/SqlCaseOperator.java| 14 ++---
 .../apache/calcite/sql/fun/SqlCastFunction.java|  3 +-
 .../org/apache/calcite/sql/fun/SqlDotOperator.java |  4 +-
 .../calcite/sql/fun/SqlLiteralChainOperator.java   |  5 +-
 .../calcite/sql/fun/SqlMapValueConstructor.java|  6 +-
 .../sql/fun/SqlMultisetMemberOfOperator.java   | 10 +---
 .../sql/fun/SqlMultisetQueryConstructor.java   |  6 +-
 .../sql/fun/SqlMultisetValueConstructor.java   |  5 +-
 .../calcite/sql/fun/SqlSubstringFunction.java  |  6 +-
 .../sql/type/AssignableOperandTypeChecker.java |  5 +-
 .../calcite/sql/type/FamilyOperandTypeChecker.java |  8 +--
 .../org/apache/calcite/sql/type/InferTypes.java|  3 +-
 .../sql/type/MultisetOperandTypeChecker.java   |  6 +-
 .../org/apache/calcite/sql/type/OperandTypes.java  | 13 +
 .../org/apache/calcite/sql/type/SqlTypeUtil.java   | 64 --
 16 files changed, 79 insertions(+), 91 deletions(-)

diff --git a/core/src/main/java/org/apache/calcite/sql/SqlCallBinding.java 
b/core/src/main/java/org/apache/calcite/sql/SqlCallBinding.java
index 5ab0bac..c0bda8d 100644
--- a/core/src/main/java/org/apache/calcite/sql/SqlCallBinding.java
+++ b/core/src/main/java/org/apache/calcite/sql/SqlCallBinding.java
@@ -27,6 +27,7 @@ import org.apache.calcite.sql.parser.SqlParserPos;
 import org.apache.calcite.sql.type.SqlOperandMetadata;
 import org.apache.calcite.sql.type.SqlOperandTypeChecker;
 import org.apache.calcite.sql.type.SqlTypeName;
+import org.apache.calcite.sql.type.SqlTypeUtil;
 import org.apache.calcite.sql.validate.SelectScope;
 import org.apache.calcite.sql.validate.SqlMonotonicity;
 import org.apache.calcite.sql.validate.SqlNameMatcher;
@@ -45,10 +46,11 @@ import com.google.common.collect.Lists;
 import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Objects;
 
 import static org.apache.calcite.util.Static.RESOURCE;
 
+import static java.util.Objects.requireNonNull;
+
 /**
  * SqlCallBinding implements {@link SqlOperatorBinding} by
  * analyzing to the operands of a {@link SqlCall} with a {@link SqlValidator}.
@@ -290,8 +292,8 @@ public class SqlCallBinding extends SqlOperatorBinding {
   for (int i = 0; i < operands.size(); i += 2) {
 final SqlNode key = operands.get(i);
 final SqlNode value = operands.get(i + 1);
-builder2.put(Objects.requireNonNull(valueAs(key, Object.class)),
-Objects.requireNonNull(valueAs(value, Object.class)));
+builder2.put(requireNonNull(valueAs(key, Object.class), "key"),
+requireNonNull(valueAs(value, Object.class), "value"));
   }
   return clazz.cast(builder2.build());
 
@@ -341,7 +343,7 @@ public class SqlCallBinding extends SqlOperatorBinding {
 
   @Override public RelDataType getOperandType(int ordinal) {
 final SqlNode operand = call.operand(ordinal);
-final RelDataType type = validator.deriveType(scope, operand);
+final RelDataType type = SqlTypeUtil.deriveType(this, operand);
 final SqlValidatorNamespace namespace = validator.getNamespace(operand);
 if (namespace != null) {
   return namespace.getType();
@@ -356,7 +358,7 @@ public class SqlCallBinding extends SqlOperatorBinding {
 }
 final SqlCall cursorCall = (SqlCall) operand;
 final SqlNode query = cursorCall.operand(0);
-return validator.deriveType(scope, query);
+return SqlTypeUtil.deriveType(this, query);
   }
 
   @Override public String getColumnListParamInfo(
diff --git a/core/src/main/java/org/apache/calcite/sql/fun/SqlCaseOperator.java 
b/core/src/main/java/org/apache/calcite/sql/fun/SqlCaseOperator.java
index 7d5c567..73868aa 100644
--- a/core/src/main/java/org/apache/calcite/sql/fun/SqlCaseOperator.java
+++ b/core/src/main/java/org/apache/calcite/sql/fun/SqlCaseOperator.java
@@ -179,10 +179,7 @@ public class SqlCaseOperator extends SqlOperator {
 // checking that search conditions are ok...
 for (SqlNode node : whenList) {
   // should throw validation error if something wrong...
-  RelDataType type =
-  callBinding.getValidator().deriveType(
-  callBinding.getScope(),
-  node);
+  RelDataType type = SqlTypeUtil.deriv

[calcite] branch master updated: Add MaxMetaspaceSize=512m to avoid metaspace issues when building Calcite

2020-09-27 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new 1050b36  Add MaxMetaspaceSize=512m to avoid metaspace issues when 
building Calcite
1050b36 is described below

commit 1050b36cafbb0c487b7a2ade3efd12850609717e
Author: Vladimir Sitnikov 
AuthorDate: Mon Sep 28 00:30:19 2020 +0300

Add MaxMetaspaceSize=512m to avoid metaspace issues when building Calcite

Gradle defaults to 256m which seems to be too small
---
 gradle.properties | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gradle.properties b/gradle.properties
index ebd316b..6e4d0c5 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -14,6 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
+org.gradle.jvmargs=-Xmx512m -XX:MaxMetaspaceSize=512m
 org.gradle.parallel=true
 # Build cache can be disabled with --no-build-cache option
 org.gradle.caching=true



[calcite] branch master updated (a3d02d2 -> 0d52063)

2020-09-27 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from a3d02d2  Refactor Pair comparison to use Comparator.nullsFirst and 
.naturalOrder()
 add 0d52063  [CALCITE-4214] Make RelDataType.getSqlTypeName non-nullable

No new revisions were added by this update.

Summary of changes:
 core/src/main/java/org/apache/calcite/rel/type/RelDataType.java | 2 +-
 core/src/main/java/org/apache/calcite/rel/type/RelDataTypeImpl.java | 6 ++
 2 files changed, 7 insertions(+), 1 deletion(-)



[calcite] branch master updated: Refactor Pair comparison to use Comparator.nullsFirst and .naturalOrder()

2020-09-27 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/master by this push:
 new a3d02d2  Refactor Pair comparison to use Comparator.nullsFirst and 
.naturalOrder()
a3d02d2 is described below

commit a3d02d2517e5cd7cc8d1da02309bdabe76ab195d
Author: Vladimir Sitnikov 
AuthorDate: Sat Sep 5 20:11:15 2020 +0300

Refactor Pair comparison to use Comparator.nullsFirst and .naturalOrder()
---
 .../main/java/org/apache/calcite/util/Pair.java| 33 ++
 1 file changed, 8 insertions(+), 25 deletions(-)

diff --git a/core/src/main/java/org/apache/calcite/util/Pair.java 
b/core/src/main/java/org/apache/calcite/util/Pair.java
index 9cd9c2e..26fa8cf 100644
--- a/core/src/main/java/org/apache/calcite/util/Pair.java
+++ b/core/src/main/java/org/apache/calcite/util/Pair.java
@@ -19,6 +19,7 @@ package org.apache.calcite.util;
 import java.io.Serializable;
 import java.util.AbstractList;
 import java.util.Collections;
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -39,6 +40,11 @@ import javax.annotation.Nonnull;
  */
 public class Pair
 implements Comparable>, Map.Entry, Serializable {
+
+  @SuppressWarnings({"rawtypes", "unchecked"})
+  private static final Comparator NULLS_FIRST_COMPARATOR =
+  Comparator.nullsFirst((Comparator) Comparator.naturalOrder());
+
   //~ Instance fields 
 
   public final T1 left;
@@ -100,10 +106,10 @@ public class Pair
 
   public int compareTo(@Nonnull Pair that) {
 //noinspection unchecked
-int c = compare((Comparable) this.left, (Comparable) that.left);
+int c = NULLS_FIRST_COMPARATOR.compare(this.left, that.left);
 if (c == 0) {
   //noinspection unchecked
-  c = compare((Comparable) this.right, (Comparable) that.right);
+  c = NULLS_FIRST_COMPARATOR.compare(this.right, that.right);
 }
 return c;
   }
@@ -125,29 +131,6 @@ public class Pair
   }
 
   /**
-   * Compares a pair of comparable values of the same type. Null collates
-   * less than everything else, but equal to itself.
-   *
-   * @param c1 First value
-   * @param c2 Second value
-   * @return a negative integer, zero, or a positive integer if c1
-   * is less than, equal to, or greater than c2.
-   */
-  private static > int compare(C c1, C c2) {
-if (c1 == null) {
-  if (c2 == null) {
-return 0;
-  } else {
-return -1;
-  }
-} else if (c2 == null) {
-  return 1;
-} else {
-  return c1.compareTo(c2);
-}
-  }
-
-  /**
* Converts a collection of Pairs into a Map.
*
* This is an obvious thing to do because Pair is similar in structure to



[calcite] branch master updated (86b42f3 -> eb4011b)

2020-09-05 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


from 86b42f3  [CALCITE-4217] Unlock RelCrossType#getFieldCount()
 new ff169fb  [CALCITE-4228] FlatLists.Flat6List#append should not throw 
NPE if there are null elements in the list
 new 9422fd4  [CALCITE-4226] Add Mappings#asListNonNull as a null-safe 
alternative for Mappings#asList
 new ad164ed  [CALCITE-4227] ImmutableIntList#toArray(Integer[]) should 
support arguments larger than the collection itself
 new fb2a02f  Remove ArrayList allocation from Mappings#bijection, and add 
helpful message in case NPE is thrown
 new eb4011b  Update org.nosphere.apache.rat plugin from 0.5.2 to 0.7.0, 
and print files with unapproved licenses to console

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 build.gradle.kts   |  1 +
 .../java/org/apache/calcite/runtime/FlatLists.java |  2 +-
 .../org/apache/calcite/util/ImmutableIntList.java  |  2 +-
 .../org/apache/calcite/util/mapping/Mappings.java  | 37 --
 .../java/org/apache/calcite/util/UtilTest.java |  4 +++
 .../apache/calcite/util/mapping/MappingTest.java   | 13 +++-
 gradle.properties  |  2 +-
 7 files changed, 54 insertions(+), 7 deletions(-)



[calcite] 04/05: Remove ArrayList allocation from Mappings#bijection, and add helpful message in case NPE is thrown

2020-09-05 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit fb2a02fb78f4e5b9b887645651b4b285ed68dacd
Author: Vladimir Sitnikov 
AuthorDate: Fri Sep 4 23:39:27 2020 +0300

Remove ArrayList allocation from Mappings#bijection, and add helpful 
message in case NPE is thrown

bijection requires all indices from [0..targets.size()-1) to be mapped
to non-null, and NPE was thrown if that is not the case.

The change adds extra message, so it is easier to see what aas the mapping.
---
 .../main/java/org/apache/calcite/util/mapping/Mappings.java| 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/core/src/main/java/org/apache/calcite/util/mapping/Mappings.java 
b/core/src/main/java/org/apache/calcite/util/mapping/Mappings.java
index 88d2c7e..269c6cd 100644
--- a/core/src/main/java/org/apache/calcite/util/mapping/Mappings.java
+++ b/core/src/main/java/org/apache/calcite/util/mapping/Mappings.java
@@ -426,11 +426,15 @@ public abstract class Mappings {
*
* Throws if sources and targets are not one to one. */
   public static Mapping bijection(Map targets) {
-final List targetList = new ArrayList<>();
+int[] ints = new int[targets.size()];
 for (int i = 0; i < targets.size(); i++) {
-  targetList.add(targets.get(i));
+  Integer value = targets.get(i);
+  if (value == null) {
+throw new NullPointerException("Index " + i + " is not mapped in " + 
targets);
+  }
+  ints[i] = value;
 }
-return new Permutation(Ints.toArray(targetList));
+return new Permutation(ints);
   }
 
   /**



[calcite] 02/05: [CALCITE-4226] Add Mappings#asListNonNull as a null-safe alternative for Mappings#asList

2020-09-05 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit 9422fd444f0cb01cf5659045d1bb3bc71b59b73e
Author: Vladimir Sitnikov 
AuthorDate: Fri Sep 4 23:29:30 2020 +0300

[CALCITE-4226] Add Mappings#asListNonNull as a null-safe alternative for 
Mappings#asList
---
 .../org/apache/calcite/util/mapping/Mappings.java  | 27 ++
 .../apache/calcite/util/mapping/MappingTest.java   | 13 ++-
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/core/src/main/java/org/apache/calcite/util/mapping/Mappings.java 
b/core/src/main/java/org/apache/calcite/util/mapping/Mappings.java
index 9162d40..88d2c7e 100644
--- a/core/src/main/java/org/apache/calcite/util/mapping/Mappings.java
+++ b/core/src/main/java/org/apache/calcite/util/mapping/Mappings.java
@@ -326,6 +326,33 @@ public abstract class Mappings {
   }
 
   /**
+   * Returns a mapping as a list such that {@code list.get(source)} is
+   * {@code mapping.getTarget(source)} and {@code list.size()} is
+   * {@code mapping.getSourceCount()}.
+   *
+   * The resulting list never contains null elements
+   *
+   * Converse of {@link #target(List, int)}
+   * @see #asList(TargetMapping)
+   */
+  public static List asListNonNull(final TargetMapping mapping) {
+return new AbstractList() {
+  public Integer get(int source) {
+int target = mapping.getTargetOpt(source);
+if (target < 0) {
+  throw new IllegalArgumentException("Element " + source + " is not 
found in mapping "
+  + mapping);
+}
+return target;
+  }
+
+  public int size() {
+return mapping.getSourceCount();
+  }
+};
+  }
+
+  /**
* Converts a {@link Map} of integers to a {@link TargetMapping}.
*/
   public static TargetMapping target(
diff --git 
a/core/src/test/java/org/apache/calcite/util/mapping/MappingTest.java 
b/core/src/test/java/org/apache/calcite/util/mapping/MappingTest.java
index 9be5938..42a41a7 100644
--- a/core/src/test/java/org/apache/calcite/util/mapping/MappingTest.java
+++ b/core/src/test/java/org/apache/calcite/util/mapping/MappingTest.java
@@ -171,7 +171,10 @@ class MappingTest {
 assertThrows(IndexOutOfBoundsException.class, () -> mapping.getTarget(-1));
 
 final List integers = Mappings.asList(mapping);
-assertThat(integers, equalTo(targets));
+assertThat("Mappings.asList" + mapping + ")", integers, equalTo(targets));
+assertThat(
+"Mappings.asListNonNull(" + mapping + ")",
+Mappings.asListNonNull(mapping), equalTo(targets));
 
 final Mapping inverse = mapping.inverse();
 assertThat(inverse.toString(),
@@ -200,6 +203,14 @@ class MappingTest {
 final List integers = Mappings.asList(mapping);
 assertThat(integers,
 equalTo(Arrays.asList(null, 1, null, 0, 2, 3, null, null, 4, null)));
+
+// Note: exception is thrown on list.get, so it is needed to trigger the 
exception
+IllegalArgumentException exception =
+assertThrows(IllegalArgumentException.class, () ->
+Mappings.asListNonNull(mapping).get(0));
+assertThat(exception.getMessage(),
+equalTo("Element 0 is not found in mapping [size=5, sourceCount=10, 
targetCount=5"
++ ", elements=[1:1, 3:0, 4:2, 5:3, 8:4]]"));
   }
 
   /** Unit test for {@link Mappings#bijection(List)}. */



[calcite] 05/05: Update org.nosphere.apache.rat plugin from 0.5.2 to 0.7.0, and print files with unapproved licenses to console

2020-09-05 Thread vladimirsitnikov
This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit eb4011bb4b9d962c2f8e6767cbee8c23435ef939
Author: Vladimir Sitnikov 
AuthorDate: Sat Sep 5 00:15:18 2020 +0300

Update org.nosphere.apache.rat plugin from 0.5.2 to 0.7.0, and print files 
with unapproved licenses to console
---
 build.gradle.kts  | 1 +
 gradle.properties | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/build.gradle.kts b/build.gradle.kts
index 59e883b..2aa49f1 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -86,6 +86,7 @@ val gitProps by tasks.registering(FindGitAttributes::class) {
 
 val rat by tasks.getting(org.nosphere.apache.rat.RatTask::class) {
 gitignore(gitProps)
+verbose.set(true)
 // Note: patterns are in non-standard syntax for RAT, so we use 
exclude(..) instead of excludeFile
 exclude(rootDir.resolve(".ratignore").readLines())
 }
diff --git a/gradle.properties b/gradle.properties
index 867ef45..ebd316b 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -50,7 +50,7 @@ de.thetaphi.forbiddenapis.version=2.7
 kotlin.version=1.3.50
 me.champeau.gradle.jmh.version=0.5.0
 org.jetbrains.gradle.plugin.idea-ext.version=0.5
-org.nosphere.apache.rat.version=0.5.2
+org.nosphere.apache.rat.version=0.7.0
 org.owasp.dependencycheck.version=5.2.2
 
 # TODO



  1   2   3   4   5   >