File tree Expand file tree Collapse file tree
core/src/main/java/org/opensearch/sql/expression/function Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151import org .opensearch .sql .expression .function .udf .math .DivideFunction ;
5252import org .opensearch .sql .expression .function .udf .math .EulerFunction ;
5353import org .opensearch .sql .expression .function .udf .math .ModFunction ;
54- import org .opensearch .sql .expression .function .udf .text .LocateFunction ;
5554
5655/** Defines functions and operators that are implemented only by PPL */
5756public class PPLBuiltinOperators extends ReflectiveSqlOperatorTable {
@@ -64,9 +63,6 @@ public class PPLBuiltinOperators extends ReflectiveSqlOperatorTable {
6463 public static final SqlOperator CRC32 = new CRC32Function ().toUDF ("CRC32" );
6564 public static final SqlOperator DIVIDE = new DivideFunction ().toUDF ("DIVIDE" );
6665
67- // Text function
68- public static final SqlOperator LOCATE = new LocateFunction ().toUDF ("LOCATE" );
69-
7066 // Datetime function
7167 public static final SqlOperator TIMESTAMP = new TimestampFunction ().toUDF ("TIMESTAMP" );
7268 public static final SqlOperator DATE =
Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ void populate() {
171171 registerOperator (LENGTH , SqlStdOperatorTable .CHAR_LENGTH );
172172 registerOperator (LOWER , SqlStdOperatorTable .LOWER );
173173 registerOperator (POSITION , SqlStdOperatorTable .POSITION );
174+ registerOperator (LOCATE , SqlStdOperatorTable .POSITION );
174175 registerOperator (REPLACE , SqlStdOperatorTable .REPLACE );
175176 registerOperator (SUBSTRING , SqlStdOperatorTable .SUBSTRING );
176177 registerOperator (SUBSTR , SqlStdOperatorTable .SUBSTRING );
@@ -224,7 +225,6 @@ void populate() {
224225 registerOperator (MODULUSFUNCTION , PPLBuiltinOperators .MOD );
225226 registerOperator (CRC32 , PPLBuiltinOperators .CRC32 );
226227 registerOperator (DIVIDE , PPLBuiltinOperators .DIVIDE );
227- registerOperator (LOCATE , PPLBuiltinOperators .LOCATE );
228228
229229 // Register PPL Datetime UDF operator
230230 registerOperator (TIMESTAMP , PPLBuiltinOperators .TIMESTAMP );
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments