You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by dz...@apache.org on 2023/03/10 10:17:06 UTC
[drill] branch calcite-1.34-test updated: Hadoop 3.2.4 → 3.3.4.
This is an automated email from the ASF dual-hosted git repository.
dzamo pushed a commit to branch calcite-1.34-test
in repository https://gitbox.apache.org/repos/asf/drill.git
The following commit(s) were added to refs/heads/calcite-1.34-test by this push:
new d5ab2e000f Hadoop 3.2.4 → 3.3.4.
d5ab2e000f is described below
commit d5ab2e000f562eb52b638fc461cefe397d960bcf
Author: James Turton <ja...@somecomputer.xyz>
AuthorDate: Fri Mar 10 12:16:17 2023 +0200
Hadoop 3.2.4 → 3.3.4.
---
exec/java-exec/src/main/codegen/data/Parser.tdd | 3 +++
.../src/main/codegen/includes/parserImpls.ftl | 28 ++++++++++++++++++++++
pom.xml | 2 +-
3 files changed, 32 insertions(+), 1 deletion(-)
diff --git a/exec/java-exec/src/main/codegen/data/Parser.tdd b/exec/java-exec/src/main/codegen/data/Parser.tdd
index 98107cd44c..e5f9c02d52 100644
--- a/exec/java-exec/src/main/codegen/data/Parser.tdd
+++ b/exec/java-exec/src/main/codegen/data/Parser.tdd
@@ -173,7 +173,9 @@
"CURSOR_NAME"
"DATA"
"DATABASE"
+ "DATE_DIFF"
"DATE_TRUNC"
+ "DATETIME_DIFF"
"DATETIME_INTERVAL_CODE"
"DATETIME_INTERVAL_PRECISION"
"DAYS"
@@ -952,6 +954,7 @@
# Return type of method implementation should be "SqlNode".
# Example: DateFunctionCall().
builtinFunctionCallMethods: [
+ "DrillDateDiffFunctionCall()"
]
includePosixOperators: false,
diff --git a/exec/java-exec/src/main/codegen/includes/parserImpls.ftl b/exec/java-exec/src/main/codegen/includes/parserImpls.ftl
index bb3b3c7b19..225b639c08 100644
--- a/exec/java-exec/src/main/codegen/includes/parserImpls.ftl
+++ b/exec/java-exec/src/main/codegen/includes/parserImpls.ftl
@@ -988,3 +988,31 @@ SqlNode SqlDropAllAliases() :
.build();
}
}
+
+/**
+ * Parses a call to Drill's DATE_DIFF.
+ */
+SqlCall DrillDateDiffFunctionCall() :
+{
+ final List<SqlNode> args;
+ final Span s;
+ final SqlIdentifier funcName = SimpleIdentifier();
+ SqlNode e1, e2;
+}
+{
+ <DATE_DIFF> { s = span(); }
+ <LPAREN> e1 = Expression(ExprContext.ACCEPT_SUB_QUERY) {
+ args = startList(e1);
+ }
+ <COMMA> e2 = Expression(ExprContext.ACCEPT_SUB_QUERY) {
+ args.add(e2);
+ }
+ <RPAREN> {
+ return createCall(funcName,
+ s.end(this),
+ SqlFunctionCategory.USER_DEFINED_FUNCTION,
+ null,
+ args
+ );
+ }
+}
diff --git a/pom.xml b/pom.xml
index 7fb9c588f1..8343ec0fd0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -79,7 +79,7 @@
for example parquet-hadoop-bundle and derby dependencies.
-->
<hive.version>3.1.3</hive.version>
- <hadoop.version>3.2.4</hadoop.version>
+ <hadoop.version>3.3.4</hadoop.version>
<hbase.version>2.4.9</hbase.version>
<fmpp.version>1.0</fmpp.version>
<freemarker.version>2.3.30</freemarker.version>