[
https://issues.apache.org/jira/browse/DRILL-8424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17713119#comment-17713119
]
ASF GitHub Bot commented on DRILL-8424:
---------------------------------------
cgivre commented on code in PR #2794:
URL: https://github.com/apache/drill/pull/2794#discussion_r1168776897
##########
exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/conversion/DrillRexBuilder.java:
##########
@@ -65,9 +65,9 @@ public RexNode ensureType(
* @return Call to CAST operator
*/
@Override
- public RexNode makeCast(RelDataType type, RexNode exp, boolean
matchNullability) {
+ public RexNode makeCast(RelDataType type, RexNode exp, boolean
matchNullability, boolean safe) {
Review Comment:
This really highlights an issue with Calcite. They really could have added
an additional function something like below and nothing would have broken...
```
makeCast(RelDataType type, RexNode exp, boolean matchNullability) {
return makeCast(type, exp, matchNullability, false);
}
```
##########
exec/java-exec/src/main/codegen/templates/Parser.jj:
##########
@@ -15,9 +15,11 @@
* limitations under the License.
*/
-// TODO: Delete this file to reinstate its extraction from calcite-core.jar
-// once CALCITE-5579 is resolved and the incompatible grammar changes
introduced
-// by CALCITE-5469 have been backed out. Also see: exec/java-exec/pom.xml.
Review Comment:
Do we want to leave the original info here just so that we know which
Calcite PRs we're waiting for?
##########
exec/java-exec/src/main/codegen/templates/Parser.jj:
##########
@@ -7727,6 +7764,8 @@ SqlPostfixOperator PostfixRowOperator() :
| < DATETIME_INTERVAL_CODE: "DATETIME_INTERVAL_CODE" >
| < DATETIME_INTERVAL_PRECISION: "DATETIME_INTERVAL_PRECISION" >
| < DAY: "DAY" >
+| < DAYOFWEEK: "DAYOFWEEK" >
+| < DAYOFYEAR: "DAYOFYEAR" >
Review Comment:
Should we add a unit test for these synonyms?
> Accommodate RexBuilder changes made for SAFE_CAST
> -------------------------------------------------
>
> Key: DRILL-8424
> URL: https://issues.apache.org/jira/browse/DRILL-8424
> Project: Apache Drill
> Issue Type: Improvement
> Components: Query Planning & Optimization
> Affects Versions: 1.22.0
> Reporter: James Turton
> Assignee: James Turton
> Priority: Major
> Fix For: 1.22.0
>
>
> The introduction of SAFE_CAST support in CALCITE-5575 made method signature
> changes in RexBuilder that broke a needed override in DrillRexBuilder.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)