Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
import static org.apache.calcite.sql.fun.SqlLibraryOperators.JSON_KEYS;
import static org.apache.calcite.sql.fun.SqlLibraryOperators.JSON_LENGTH;
import static org.apache.calcite.sql.fun.SqlLibraryOperators.JSON_PRETTY;
import static org.apache.calcite.sql.fun.SqlLibraryOperators.JSON_REMOVE;
import static org.apache.calcite.sql.fun.SqlLibraryOperators.JSON_TYPE;
import static org.apache.calcite.sql.fun.SqlLibraryOperators.TRANSLATE3;
import static org.apache.calcite.sql.fun.SqlStdOperatorTable.ABS;
Expand Down Expand Up @@ -172,7 +173,6 @@
import static org.apache.calcite.sql.fun.SqlStdOperatorTable.JSON_OBJECT;
import static org.apache.calcite.sql.fun.SqlStdOperatorTable.JSON_OBJECTAGG;
import static org.apache.calcite.sql.fun.SqlStdOperatorTable.JSON_QUERY;
import static org.apache.calcite.sql.fun.SqlStdOperatorTable.JSON_REMOVE;
import static org.apache.calcite.sql.fun.SqlStdOperatorTable.JSON_VALUE_ANY;
import static org.apache.calcite.sql.fun.SqlStdOperatorTable.JSON_VALUE_EXPRESSION;
import static org.apache.calcite.sql.fun.SqlStdOperatorTable.LAG;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,22 @@ private SqlLibraryOperators() {
public static final SqlFunction TRANSLATE3 = new SqlTranslate3Function();

@LibraryOperator(libraries = {MYSQL})
public static final SqlFunction JSON_TYPE = SqlStdOperatorTable.JSON_TYPE;
public static final SqlFunction JSON_TYPE = new SqlJsonTypeFunction();

@LibraryOperator(libraries = {MYSQL})
public static final SqlFunction JSON_DEPTH = SqlStdOperatorTable.JSON_DEPTH;
public static final SqlFunction JSON_DEPTH = new SqlJsonDepthFunction();

@LibraryOperator(libraries = {MYSQL})
public static final SqlFunction JSON_LENGTH = SqlStdOperatorTable.JSON_LENGTH;
public static final SqlFunction JSON_LENGTH = new SqlJsonLengthFunction();

@LibraryOperator(libraries = {MYSQL})
public static final SqlFunction JSON_KEYS = SqlStdOperatorTable.JSON_KEYS;
public static final SqlFunction JSON_KEYS = new SqlJsonKeysFunction();

@LibraryOperator(libraries = {MYSQL})
public static final SqlFunction JSON_PRETTY = SqlStdOperatorTable.JSON_PRETTY;
public static final SqlFunction JSON_PRETTY = new SqlJsonPrettyFunction();

@LibraryOperator(libraries = {MYSQL})
public static final SqlFunction JSON_REMOVE = new SqlJsonRemoveFunction();
}

// End SqlLibraryOperators.java
Original file line number Diff line number Diff line change
Expand Up @@ -1299,32 +1299,37 @@ public boolean argumentMustBeScalar(int ordinal) {
public static final SqlFunction JSON_VALUE =
new SqlJsonValueFunction("JSON_VALUE", false);

public static final SqlFunction JSON_KEYS = new SqlJsonKeysFunction();

public static final SqlFunction JSON_PRETTY =
new SqlJsonPrettyFunction();

public static final SqlFunction JSON_VALUE_ANY =
new SqlJsonValueFunction("JSON_VALUE_ANY", true);

public static final SqlFunction JSON_QUERY = new SqlJsonQueryFunction();

public static final SqlFunction JSON_OBJECT = new SqlJsonObjectFunction();

public static final SqlFunction JSON_TYPE = new SqlJsonTypeFunction();

public static final SqlFunction JSON_DEPTH = new SqlJsonDepthFunction();

public static final SqlFunction JSON_LENGTH = new SqlJsonLengthFunction();

public static final SqlFunction JSON_REMOVE = new SqlJsonRemoveFunction();

public static final SqlJsonObjectAggAggFunction JSON_OBJECTAGG =
new SqlJsonObjectAggAggFunction(SqlKind.JSON_OBJECTAGG,
SqlJsonConstructorNullClause.NULL_ON_NULL);

public static final SqlFunction JSON_ARRAY = new SqlJsonArrayFunction();

@Deprecated // to be removed before 2.0
public static final SqlFunction JSON_TYPE = SqlLibraryOperators.JSON_TYPE;

@Deprecated // to be removed before 2.0
public static final SqlFunction JSON_DEPTH = SqlLibraryOperators.JSON_DEPTH;

@Deprecated // to be removed before 2.0
public static final SqlFunction JSON_LENGTH = SqlLibraryOperators.JSON_LENGTH;

@Deprecated // to be removed before 2.0
public static final SqlFunction JSON_KEYS = SqlLibraryOperators.JSON_KEYS;

@Deprecated // to be removed before 2.0
public static final SqlFunction JSON_PRETTY = SqlLibraryOperators.JSON_PRETTY;

@Deprecated // to be removed before 2.0
public static final SqlFunction JSON_REMOVE = SqlLibraryOperators.JSON_REMOVE;

public static final SqlJsonArrayAggAggFunction JSON_ARRAYAGG =
new SqlJsonArrayAggAggFunction(SqlKind.JSON_ARRAYAGG,
SqlJsonConstructorNullClause.ABSENT_ON_NULL);
Expand Down