diff --git a/cassandra/pom.xml b/cassandra/pom.xml index 31c5be6546ba..9499050cf33d 100644 --- a/cassandra/pom.xml +++ b/cassandra/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-cassandra jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Cassandra Cassandra adapter for Calcite diff --git a/core/pom.xml b/core/pom.xml index c49139a24941..be459e1d06b6 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-core jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Core Core Calcite APIs and engine. diff --git a/core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java b/core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java index c0446c6ef2a1..9691ab615cc5 100644 --- a/core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java +++ b/core/src/main/java/org/apache/calcite/runtime/SqlFunctions.java @@ -1983,6 +1983,15 @@ public static int position(String seek, String s, int from) { return s.indexOf(seek, from0) + 1; } + /** SQL {@code POSITION(seek IN string FROM long)} function. */ + public static int position(String seek, String s, long from) { + if (from > Integer.MAX_VALUE || from < 0) { + return 0; + } else { + return position(seek, s, Long.valueOf(from).intValue()); + } + } + /** SQL {@code POSITION(seek IN string FROM integer)} function for byte * strings. */ public static int position(ByteString seek, ByteString s, int from) { @@ -2001,6 +2010,16 @@ public static int position(ByteString seek, ByteString s, int from) { return p + from; } + /** SQL {@code POSITION(seek IN string FROM integer)} function for byte + * strings. */ + public static int position(ByteString seek, ByteString s, long from) { + if (from > Integer.MAX_VALUE || from < 0) { + return 0; + } else { + return position(seek, s, Long.valueOf(from).intValue()); + } + } + /** Helper for rounding. Truncate(12345, 1000) returns 12000. */ public static long round(long v, long x) { return truncate(v + x / 2, x); diff --git a/druid/pom.xml b/druid/pom.xml index 7a10bd0d00aa..77df062052a9 100644 --- a/druid/pom.xml +++ b/druid/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-druid jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Druid Druid adapter for Calcite diff --git a/elasticsearch2/pom.xml b/elasticsearch2/pom.xml index b4bcf7c9efdb..7ba7a8549207 100644 --- a/elasticsearch2/pom.xml +++ b/elasticsearch2/pom.xml @@ -21,12 +21,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-elasticsearch2 jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Elasticsearch Elasticsearch adapter for Calcite diff --git a/elasticsearch5/pom.xml b/elasticsearch5/pom.xml index db7e3dc35365..abe43dc60806 100644 --- a/elasticsearch5/pom.xml +++ b/elasticsearch5/pom.xml @@ -21,12 +21,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-elasticsearch5 jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Elasticsearch5 Elasticsearch5 adapter for Calcite diff --git a/example/csv/pom.xml b/example/csv/pom.xml index 07f454140a43..5d2e9e391f03 100644 --- a/example/csv/pom.xml +++ b/example/csv/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite-example - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-example-csv jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Example CSV An example Calcite provider that reads CSV files diff --git a/example/function/pom.xml b/example/function/pom.xml index 96154bc72306..91dbd7ebcbb3 100644 --- a/example/function/pom.xml +++ b/example/function/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite-example - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-example-function jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Example Function Examples of user-defined Calcite functions diff --git a/example/pom.xml b/example/pom.xml index 4203089830fa..c21242b0b9b9 100644 --- a/example/pom.xml +++ b/example/pom.xml @@ -20,13 +20,13 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-example pom - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Examples Calcite examples diff --git a/file/pom.xml b/file/pom.xml index 84d6b84ac714..82a77a266839 100644 --- a/file/pom.xml +++ b/file/pom.xml @@ -19,13 +19,13 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-file jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite File Calcite provider that reads files and URIs diff --git a/geode/pom.xml b/geode/pom.xml index 36ddfda16228..35a18a3b26ff 100644 --- a/geode/pom.xml +++ b/geode/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-geode jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Geode Geode adapter for Calcite diff --git a/linq4j/pom.xml b/linq4j/pom.xml index 53c971c408d6..428392679a60 100644 --- a/linq4j/pom.xml +++ b/linq4j/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-linq4j jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Linq4j Calcite APIs for LINQ (Language-Integrated Query) in Java diff --git a/mongodb/pom.xml b/mongodb/pom.xml index a9314dbd0c0d..f94dde57f077 100644 --- a/mongodb/pom.xml +++ b/mongodb/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-mongodb jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite MongoDB MongoDB adapter for Calcite diff --git a/pig/pom.xml b/pig/pom.xml index c3edf342b94c..0ca49c3ca3bf 100644 --- a/pig/pom.xml +++ b/pig/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-pig jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Pig Pig adapter for Calcite diff --git a/piglet/pom.xml b/piglet/pom.xml index cfb9189399d6..769590b9ab4a 100644 --- a/piglet/pom.xml +++ b/piglet/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-piglet jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Piglet Pig-like language built on top of Calcite algebra diff --git a/plus/pom.xml b/plus/pom.xml index 121f7b65d5de..ac96e59cd057 100644 --- a/plus/pom.xml +++ b/plus/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-plus jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Plus Miscellaneous extras for Calcite diff --git a/pom.xml b/pom.xml index 311ee0285970..6db4a55c4b21 100644 --- a/pom.xml +++ b/pom.xml @@ -27,7 +27,7 @@ limitations under the License. org.apache.calcite calcite pom - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite diff --git a/server/pom.xml b/server/pom.xml index 74f7bb893e2c..cee3019e5704 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-server jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Server Calcite Server diff --git a/spark/pom.xml b/spark/pom.xml index 8cc91c0ba8dd..d75306358f37 100644 --- a/spark/pom.xml +++ b/spark/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-spark jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Spark diff --git a/splunk/pom.xml b/splunk/pom.xml index 408161c0c3e5..a4dfdec22987 100644 --- a/splunk/pom.xml +++ b/splunk/pom.xml @@ -20,12 +20,12 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 calcite-splunk jar - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59 Calcite Splunk Splunk adapter for Calcite; also a JDBC driver for Splunk diff --git a/ubenchmark/pom.xml b/ubenchmark/pom.xml index e48fe0076c49..f8dc936d697f 100644 --- a/ubenchmark/pom.xml +++ b/ubenchmark/pom.xml @@ -20,7 +20,7 @@ limitations under the License. org.apache.calcite calcite - 1.16.0-kylin-3.x-r58 + 1.16.0-kylin-3.x-r59