public static class NestedDataOperatorConversions.DruidJsonValueConvertletFactory extends Object implements DruidConvertletFactory
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 and Description |
|---|
DruidJsonValueConvertletFactory() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.calcite.sql2rel.SqlRexConvertlet |
createConvertlet(PlannerContext plannerContext) |
List<org.apache.calcite.sql.SqlOperator> |
operators()
Operators that this convertlet can handle.
|
public org.apache.calcite.sql2rel.SqlRexConvertlet createConvertlet(PlannerContext plannerContext)
createConvertlet in interface DruidConvertletFactorypublic List<org.apache.calcite.sql.SqlOperator> operators()
DruidConvertletFactoryoperators in interface DruidConvertletFactoryCopyright © 2011–2022 The Apache Software Foundation. All rights reserved.