@Internal public class WrapJsonAggFunctionArgumentsRule extends org.apache.calcite.plan.RelRule<WrapJsonAggFunctionArgumentsRule.Config>
BuiltInFunctionDefinitions.JSON_STRING.
Essentially, a call like JSON_OBJECTAGG(f0 VALUE f1) will be transformed into JSON_OBJECTAGG(f0 VALUE JSON_STRING(f1)). By placing a marker RelHint on the aggregation
afterwards we ensure that this transformation occurs just once.
BuiltInFunctionDefinitions.JSON_STRING will take care of serializing the values into
their correct representation, and the actual aggregation function's implementation can simply
insert the values as raw nodes instead. This avoids having to re-implement the logic for all
supported types in the aggregation function again.
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
WrapJsonAggFunctionArgumentsRule.Config
Configuration for
WrapJsonAggFunctionArgumentsRule. |
org.apache.calcite.plan.RelRule.Done, org.apache.calcite.plan.RelRule.MatchHandler<R extends org.apache.calcite.plan.RelOptRule>, org.apache.calcite.plan.RelRule.OperandBuilder, org.apache.calcite.plan.RelRule.OperandDetailBuilder<R extends org.apache.calcite.rel.RelNode>, org.apache.calcite.plan.RelRule.OperandTransform| 限定符和类型 | 字段和说明 |
|---|---|
static org.apache.calcite.plan.RelOptRule |
INSTANCE |
| 构造器和说明 |
|---|
WrapJsonAggFunctionArgumentsRule(WrapJsonAggFunctionArgumentsRule.Config config) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onMatch(org.apache.calcite.plan.RelOptRuleCall call) |
public WrapJsonAggFunctionArgumentsRule(WrapJsonAggFunctionArgumentsRule.Config config)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.