Commit e79bf2f 1 parent da13610 commit e79bf2f Copy full SHA for e79bf2f
File tree 3 files changed +7
-3
lines changed
dingo-calcite/src/main/java/io/dingodb/calcite
dingo-exec/src/main/java/io/dingodb/exec/fun
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 72
72
import io .dingodb .calcite .program .DecorrelateProgram ;
73
73
import io .dingodb .calcite .rel .DingoCost ;
74
74
import io .dingodb .calcite .rel .LogicalExportData ;
75
- import io .dingodb .calcite .rel .LogicalForUpdate ;
76
75
import io .dingodb .calcite .rel .logical .LogicalDingoRoot ;
77
76
import io .dingodb .calcite .rule .DingoRules ;
78
77
import io .dingodb .calcite .runtime .DingoResource ;
97
96
import org .apache .calcite .plan .ConventionTraitDef ;
98
97
import org .apache .calcite .plan .RelOptCluster ;
99
98
import org .apache .calcite .plan .RelOptRule ;
100
- import org .apache .calcite .plan .RelOptTable ;
101
99
import org .apache .calcite .plan .RelTraitSet ;
102
100
import org .apache .calcite .plan .ViewExpanders ;
103
101
import org .apache .calcite .plan .volcano .AbstractConverter ;
@@ -198,6 +196,11 @@ public boolean isOffsetLimitAllowed() {
198
196
public boolean isInsertSubsetColumnsAllowed () {
199
197
return false ;
200
198
}
199
+
200
+ @ Override
201
+ public boolean allowCharLiteralAlias () {
202
+ return true ;
203
+ }
201
204
});
202
205
203
206
@ Getter
@@ -213,7 +216,6 @@ public boolean isInsertSubsetColumnsAllowed() {
213
216
214
217
public DingoParser (final @ NonNull DingoParserContext context ) {
215
218
this .context = context ;
216
-
217
219
// Create Planner.
218
220
planner = new VolcanoPlanner (DingoCost .FACTORY , context );
219
221
// Set to `true` to use `TopDownRuleDriver`, or `IterativeRuleDriver` is used.
Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ private void init() {
111
111
funMap .put ("NOW" , SqlStdOperatorTable .CURRENT_TIMESTAMP );
112
112
funMap .put ("CURDATE" , SqlStdOperatorTable .CURRENT_DATE );
113
113
funMap .put ("CURTIME" , SqlStdOperatorTable .CURRENT_TIME );
114
+ funMap .put ("SUBSTR" , SqlStdOperatorTable .SUBSTRING );
114
115
115
116
// number
116
117
registerFunction (
Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ private DingoFunFactory() {
47
47
super (ExprConfig .ADVANCED );
48
48
registerBinaryFun (SUBSTRING , Exprs .MID2 );
49
49
registerTertiaryFun (SUBSTRING , Exprs .MID3 );
50
+ registerTertiaryFun ("SUBSTR" , Exprs .MID3 );
50
51
registerBinaryFun (PowFunFactory .NAME , PowFunFactory .INSTANCE );
51
52
registerNullaryFun (ThrowFun .NAME , ThrowFun .INSTANCE );
52
53
You can’t perform that action at this time.
0 commit comments