Class NestedDataOperatorConversions.DruidJsonValueConvertletFactory
java.lang.Object
org.apache.druid.sql.calcite.expression.builtin.NestedDataOperatorConversions.DruidJsonValueConvertletFactory
- All Implemented Interfaces:
DruidConvertletFactory
- Enclosing class:
- NestedDataOperatorConversions
public static class NestedDataOperatorConversions.DruidJsonValueConvertletFactory
extends Object
implements DruidConvertletFactory
The
StandardConvertletTable converts json_value(.. RETURNING type) into
cast(json_value_any(..), type).
This is not that useful for us, so we have our own convertlet, to translate into specialized operators such
as NestedDataOperatorConversions.JsonValueBigintOperatorConversion, NestedDataOperatorConversions.JsonValueDoubleOperatorConversion, or
NestedDataOperatorConversions.JsonValueVarcharOperatorConversion, before falling back to NestedDataOperatorConversions.JsonValueAnyOperatorConversion.
This convertlet still always wraps the function in a SqlStdOperatorTable.CAST, to smooth out type
mismatches, such as VARCHAR(2000) vs VARCHAR or whatever else various type checkers like to complain about not
exactly matching.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.calcite.sql2rel.SqlRexConvertletcreateConvertlet(PlannerContext plannerContext) List<org.apache.calcite.sql.SqlOperator>Operators that this convertlet can handle.
-
Constructor Details
-
DruidJsonValueConvertletFactory
public DruidJsonValueConvertletFactory()
-
-
Method Details
-
createConvertlet
- Specified by:
createConvertletin interfaceDruidConvertletFactory
-
operators
Description copied from interface:DruidConvertletFactoryOperators that this convertlet can handle.- Specified by:
operatorsin interfaceDruidConvertletFactory
-