test_class.declarator: DEFAULT_REL_CONFIG =
        SqlToRelConverter.configBuilder()
            .withTrimUnusedFields(false)
            .withConvertTableAccess(false)
            .build()
test_class.modifier: static final
test_class.original_string: static final SqlToRelConverter.Config DEFAULT_REL_CONFIG =
        SqlToRelConverter.configBuilder()
            .withTrimUnusedFields(false)
            .withConvertTableAccess(false)
            .build();
test_class.type: SqlToRelConverter.Config
test_class.var_name: DEFAULT_REL_CONFIG
test_class.declarator: NO_EXPAND_CONFIG =
        SqlToRelConverter.configBuilder()
            .withTrimUnusedFields(false)
            .withConvertTableAccess(false)
            .withExpand(false)
            .build()
test_class.modifier: static final
test_class.original_string: static final SqlToRelConverter.Config NO_EXPAND_CONFIG =
        SqlToRelConverter.configBuilder()
            .withTrimUnusedFields(false)
            .withConvertTableAccess(false)
            .withExpand(false)
            .build();
test_class.type: SqlToRelConverter.Config
test_class.var_name: NO_EXPAND_CONFIG
test_class.file: parser/src/test/java/com/qihoo/qsql/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java
test_class.identifier: RelToSqlConverterTest
test_case.body: @Test public void testSum0BecomesCoalesce() {
      final RelBuilder builder = relBuilder();
      final RelNode root = builder
          .scan("EMP")
          .aggregate(builder.groupKey(),
              builder.aggregateCall(SqlStdOperatorTable.SUM0, builder.field(3))
                  .as("s"))
          .build();
      final String expectedMysql = "SELECT COALESCE(SUM(`MGR`), 0) AS `s`\n"
          + "FROM `scott`.`EMP`";
      assertThat(toSql(root, SqlDialect.DatabaseProduct.MYSQL.getDialect()),
          isLinux(expectedMysql));
      final String expectedPostgresql = "SELECT COALESCE(SUM(\"MGR\"), 0) AS \"s\"\n"
          + "FROM \"scott\".\"EMP\"";
      assertThat(toSql(root, SqlDialect.DatabaseProduct.POSTGRESQL.getDialect()),
          isLinux(expectedPostgresql));
    }
test_case.class_method_signature: RelToSqlConverterTest.testSum0BecomesCoalesce()
test_case.full_signature: @Test public void testSum0BecomesCoalesce()
test_case.identifier: testSum0BecomesCoalesce
test_case.invocations: relBuilder build aggregate scan groupKey as aggregateCall field assertThat toSql getDialect isLinux assertThat toSql getDialect isLinux
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSum0BecomesCoalesce()
focal_class.declarator: ANONYMOUS_ROW = new SqlRowOperator(" ")
focal_class.modifier: private static final
focal_class.original_string: private static final SqlRowOperator ANONYMOUS_ROW = new SqlRowOperator(" ");
focal_class.type: SqlRowOperator
focal_class.var_name: ANONYMOUS_ROW
focal_class.declarator: dispatcher
focal_class.modifier: private final
focal_class.original_string: private final ReflectUtil.MethodDispatcher<Result> dispatcher;
focal_class.type: ReflectUtil.MethodDispatcher<Result>
focal_class.var_name: dispatcher
focal_class.declarator: stack = new ArrayDeque<>()
focal_class.modifier: private final
focal_class.original_string: private final Deque<Frame> stack = new ArrayDeque<>();
focal_class.type: Deque<Frame>
focal_class.var_name: stack
focal_class.file: parser/src/main/java/com/qihoo/qsql/org/apache/calcite/rel/rel2sql/RelToSqlConverter.java
focal_class.identifier: RelToSqlConverter
focal_class.interfaces: implements ReflectiveVisitor
focal_class.class_method_signature: RelToSqlConverter.RelToSqlConverter(SqlDialect dialect)
focal_class.full_signature: public  RelToSqlConverter(SqlDialect dialect)
focal_class.identifier: RelToSqlConverter
focal_class.modifiers: public
focal_class.parameters: (SqlDialect dialect)
focal_class.signature:  RelToSqlConverter(SqlDialect dialect)
focal_class.class_method_signature: RelToSqlConverter.dispatch(RelNode e)
focal_class.full_signature: protected Result dispatch(RelNode e)
focal_class.identifier: dispatch
focal_class.modifiers: protected
focal_class.parameters: (RelNode e)
focal_class.return: Result
focal_class.signature: Result dispatch(RelNode e)
focal_class.class_method_signature: RelToSqlConverter.visitChild(int i, RelNode e)
focal_class.full_signature: public Result visitChild(int i, RelNode e)
focal_class.identifier: visitChild
focal_class.modifiers: public
focal_class.parameters: (int i, RelNode e)
focal_class.return: Result
focal_class.signature: Result visitChild(int i, RelNode e)
focal_class.class_method_signature: RelToSqlConverter.visit(RelNode e)
focal_class.full_signature: public Result visit(RelNode e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (RelNode e)
focal_class.return: Result
focal_class.signature: Result visit(RelNode e)
focal_class.class_method_signature: RelToSqlConverter.visit(Join e)
focal_class.full_signature: public Result visit(Join e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Join e)
focal_class.return: Result
focal_class.signature: Result visit(Join e)
focal_class.class_method_signature: RelToSqlConverter.isCrossJoin(final Join e)
focal_class.full_signature: private boolean isCrossJoin(final Join e)
focal_class.identifier: isCrossJoin
focal_class.modifiers: private
focal_class.parameters: (final Join e)
focal_class.return: boolean
focal_class.signature: boolean isCrossJoin(final Join e)
focal_class.class_method_signature: RelToSqlConverter.visit(Correlate e)
focal_class.full_signature: public Result visit(Correlate e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Correlate e)
focal_class.return: Result
focal_class.signature: Result visit(Correlate e)
focal_class.class_method_signature: RelToSqlConverter.visit(Filter e)
focal_class.full_signature: public Result visit(Filter e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Filter e)
focal_class.return: Result
focal_class.signature: Result visit(Filter e)
focal_class.class_method_signature: RelToSqlConverter.visit(Project e)
focal_class.full_signature: public Result visit(Project e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Project e)
focal_class.return: Result
focal_class.signature: Result visit(Project e)
focal_class.class_method_signature: RelToSqlConverter.castNullType(SqlNode sqlNodeNull, RelDataTypeField field)
focal_class.full_signature: private SqlNode castNullType(SqlNode sqlNodeNull, RelDataTypeField field)
focal_class.identifier: castNullType
focal_class.modifiers: private
focal_class.parameters: (SqlNode sqlNodeNull, RelDataTypeField field)
focal_class.return: SqlNode
focal_class.signature: SqlNode castNullType(SqlNode sqlNodeNull, RelDataTypeField field)
focal_class.class_method_signature: RelToSqlConverter.visit(Aggregate e)
focal_class.full_signature: public Result visit(Aggregate e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Aggregate e)
focal_class.return: Result
focal_class.signature: Result visit(Aggregate e)
focal_class.class_method_signature: RelToSqlConverter.visitAggregate(Aggregate e, List<Integer> groupKeyList)
focal_class.full_signature: private Result visitAggregate(Aggregate e, List<Integer> groupKeyList)
focal_class.identifier: visitAggregate
focal_class.modifiers: private
focal_class.parameters: (Aggregate e, List<Integer> groupKeyList)
focal_class.return: Result
focal_class.signature: Result visitAggregate(Aggregate e, List<Integer> groupKeyList)
focal_class.class_method_signature: RelToSqlConverter.getAggregateBuilder(Aggregate e, Result inputResult,
        boolean inputIsProject)
focal_class.full_signature: protected Builder getAggregateBuilder(Aggregate e, Result inputResult,
        boolean inputIsProject)
focal_class.identifier: getAggregateBuilder
focal_class.modifiers: protected
focal_class.parameters: (Aggregate e, Result inputResult,
        boolean inputIsProject)
focal_class.return: Builder
focal_class.signature: Builder getAggregateBuilder(Aggregate e, Result inputResult,
        boolean inputIsProject)
focal_class.class_method_signature: RelToSqlConverter.buildAggGroupList(Aggregate e, Builder builder,
        List<SqlNode> groupByList, List<SqlNode> selectList)
focal_class.full_signature: protected void buildAggGroupList(Aggregate e, Builder builder,
        List<SqlNode> groupByList, List<SqlNode> selectList)
focal_class.identifier: buildAggGroupList
focal_class.modifiers: protected
focal_class.parameters: (Aggregate e, Builder builder,
        List<SqlNode> groupByList, List<SqlNode> selectList)
focal_class.return: void
focal_class.signature: void buildAggGroupList(Aggregate e, Builder builder,
        List<SqlNode> groupByList, List<SqlNode> selectList)
focal_class.class_method_signature: RelToSqlConverter.buildAggregate(Aggregate e, Builder builder,
        List<SqlNode> selectList, List<SqlNode> groupByList)
focal_class.full_signature: protected Result buildAggregate(Aggregate e, Builder builder,
        List<SqlNode> selectList, List<SqlNode> groupByList)
focal_class.identifier: buildAggregate
focal_class.modifiers: protected
focal_class.parameters: (Aggregate e, Builder builder,
        List<SqlNode> selectList, List<SqlNode> groupByList)
focal_class.return: Result
focal_class.signature: Result buildAggregate(Aggregate e, Builder builder,
        List<SqlNode> selectList, List<SqlNode> groupByList)
focal_class.class_method_signature: RelToSqlConverter.generateGroupList(Builder builder,
        List<SqlNode> selectList, Aggregate aggregate, List<Integer> groupList)
focal_class.full_signature: private List<SqlNode> generateGroupList(Builder builder,
        List<SqlNode> selectList, Aggregate aggregate, List<Integer> groupList)
focal_class.identifier: generateGroupList
focal_class.modifiers: private
focal_class.parameters: (Builder builder,
        List<SqlNode> selectList, Aggregate aggregate, List<Integer> groupList)
focal_class.return: List<SqlNode>
focal_class.signature: List<SqlNode> generateGroupList(Builder builder,
        List<SqlNode> selectList, Aggregate aggregate, List<Integer> groupList)
focal_class.class_method_signature: RelToSqlConverter.groupItem(List<SqlNode> groupKeys,
        ImmutableBitSet groupSet, ImmutableBitSet wholeGroupSet)
focal_class.full_signature: private SqlNode groupItem(List<SqlNode> groupKeys,
        ImmutableBitSet groupSet, ImmutableBitSet wholeGroupSet)
focal_class.identifier: groupItem
focal_class.modifiers: private
focal_class.parameters: (List<SqlNode> groupKeys,
        ImmutableBitSet groupSet, ImmutableBitSet wholeGroupSet)
focal_class.return: SqlNode
focal_class.signature: SqlNode groupItem(List<SqlNode> groupKeys,
        ImmutableBitSet groupSet, ImmutableBitSet wholeGroupSet)
focal_class.class_method_signature: RelToSqlConverter.visit(TableScan e)
focal_class.full_signature: public Result visit(TableScan e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (TableScan e)
focal_class.return: Result
focal_class.signature: Result visit(TableScan e)
focal_class.class_method_signature: RelToSqlConverter.visit(Union e)
focal_class.full_signature: public Result visit(Union e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Union e)
focal_class.return: Result
focal_class.signature: Result visit(Union e)
focal_class.class_method_signature: RelToSqlConverter.visit(Intersect e)
focal_class.full_signature: public Result visit(Intersect e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Intersect e)
focal_class.return: Result
focal_class.signature: Result visit(Intersect e)
focal_class.class_method_signature: RelToSqlConverter.visit(Minus e)
focal_class.full_signature: public Result visit(Minus e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Minus e)
focal_class.return: Result
focal_class.signature: Result visit(Minus e)
focal_class.class_method_signature: RelToSqlConverter.visit(Calc e)
focal_class.full_signature: public Result visit(Calc e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Calc e)
focal_class.return: Result
focal_class.signature: Result visit(Calc e)
focal_class.class_method_signature: RelToSqlConverter.visit(Values e)
focal_class.full_signature: public Result visit(Values e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Values e)
focal_class.return: Result
focal_class.signature: Result visit(Values e)
focal_class.class_method_signature: RelToSqlConverter.visit(DruidQuery e)
focal_class.full_signature: public Result visit(DruidQuery e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (DruidQuery e)
focal_class.return: Result
focal_class.signature: Result visit(DruidQuery e)
focal_class.class_method_signature: RelToSqlConverter.getDual()
focal_class.full_signature: private SqlIdentifier getDual()
focal_class.identifier: getDual
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: SqlIdentifier
focal_class.signature: SqlIdentifier getDual()
focal_class.class_method_signature: RelToSqlConverter.createAlwaysFalseCondition()
focal_class.full_signature: private SqlNode createAlwaysFalseCondition()
focal_class.identifier: createAlwaysFalseCondition
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: SqlNode
focal_class.signature: SqlNode createAlwaysFalseCondition()
focal_class.class_method_signature: RelToSqlConverter.visit(Sort e)
focal_class.full_signature: public Result visit(Sort e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Sort e)
focal_class.return: Result
focal_class.signature: Result visit(Sort e)
focal_class.class_method_signature: RelToSqlConverter.offsetFetch(Sort e, Result x)
focal_class.full_signature:  Result offsetFetch(Sort e, Result x)
focal_class.identifier: offsetFetch
focal_class.parameters: (Sort e, Result x)
focal_class.return: Result
focal_class.signature: Result offsetFetch(Sort e, Result x)
focal_class.class_method_signature: RelToSqlConverter.hasTrickyRollup(Sort e, Aggregate aggregate)
focal_class.full_signature: public boolean hasTrickyRollup(Sort e, Aggregate aggregate)
focal_class.identifier: hasTrickyRollup
focal_class.modifiers: public
focal_class.parameters: (Sort e, Aggregate aggregate)
focal_class.return: boolean
focal_class.signature: boolean hasTrickyRollup(Sort e, Aggregate aggregate)
focal_class.class_method_signature: RelToSqlConverter.visit(TableModify modify)
focal_class.full_signature: public Result visit(TableModify modify)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (TableModify modify)
focal_class.return: Result
focal_class.signature: Result visit(TableModify modify)
focal_class.class_method_signature: RelToSqlConverter.exprList(final Context context,
        List<? extends RexNode> exprs)
focal_class.full_signature: private SqlNodeList exprList(final Context context,
        List<? extends RexNode> exprs)
focal_class.identifier: exprList
focal_class.modifiers: private
focal_class.parameters: (final Context context,
        List<? extends RexNode> exprs)
focal_class.return: SqlNodeList
focal_class.signature: SqlNodeList exprList(final Context context,
        List<? extends RexNode> exprs)
focal_class.class_method_signature: RelToSqlConverter.identifierList(List<String> names)
focal_class.full_signature: private SqlNodeList identifierList(List<String> names)
focal_class.identifier: identifierList
focal_class.modifiers: private
focal_class.parameters: (List<String> names)
focal_class.return: SqlNodeList
focal_class.signature: SqlNodeList identifierList(List<String> names)
focal_class.class_method_signature: RelToSqlConverter.visit(Match e)
focal_class.full_signature: public Result visit(Match e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Match e)
focal_class.return: Result
focal_class.signature: Result visit(Match e)
focal_class.class_method_signature: RelToSqlConverter.as(SqlNode e, String alias)
focal_class.full_signature: private SqlCall as(SqlNode e, String alias)
focal_class.identifier: as
focal_class.modifiers: private
focal_class.parameters: (SqlNode e, String alias)
focal_class.return: SqlCall
focal_class.signature: SqlCall as(SqlNode e, String alias)
focal_class.class_method_signature: RelToSqlConverter.visit(Uncollect e)
focal_class.full_signature: public Result visit(Uncollect e)
focal_class.identifier: visit
focal_class.modifiers: public
focal_class.parameters: (Uncollect e)
focal_class.return: Result
focal_class.signature: Result visit(Uncollect e)
focal_class.class_method_signature: RelToSqlConverter.createAsFullOperands(RelDataType rowType, SqlNode leftOperand,
        String alias)
focal_class.full_signature: public List<SqlNode> createAsFullOperands(RelDataType rowType, SqlNode leftOperand,
        String alias)
focal_class.identifier: createAsFullOperands
focal_class.modifiers: public
focal_class.parameters: (RelDataType rowType, SqlNode leftOperand,
        String alias)
focal_class.return: List<SqlNode>
focal_class.signature: List<SqlNode> createAsFullOperands(RelDataType rowType, SqlNode leftOperand,
        String alias)
focal_class.class_method_signature: RelToSqlConverter.addSelect(List<SqlNode> selectList, SqlNode node,
        RelDataType rowType)
focal_class.full_signature: @Override public void addSelect(List<SqlNode> selectList, SqlNode node,
        RelDataType rowType)
focal_class.identifier: addSelect
focal_class.modifiers: @Override public
focal_class.parameters: (List<SqlNode> selectList, SqlNode node,
        RelDataType rowType)
focal_class.return: void
focal_class.signature: void addSelect(List<SqlNode> selectList, SqlNode node,
        RelDataType rowType)
focal_class.class_method_signature: RelToSqlConverter.parseCorrelTable(RelNode relNode, Result x)
focal_class.full_signature: private void parseCorrelTable(RelNode relNode, Result x)
focal_class.identifier: parseCorrelTable
focal_class.modifiers: private
focal_class.parameters: (RelNode relNode, Result x)
focal_class.return: void
focal_class.signature: void parseCorrelTable(RelNode relNode, Result x)
focal_class.superclass: extends SqlImplementor
focal_method.body: private SqlCall as(SqlNode e, String alias) {
      return SqlStdOperatorTable.AS.createCall(POS, e,
          new SqlIdentifier(alias, POS));
    }
focal_method.class_method_signature: RelToSqlConverter.as(SqlNode e, String alias)
focal_method.full_signature: private SqlCall as(SqlNode e, String alias)
focal_method.identifier: as
focal_method.invocations: createCall
focal_method.modifiers: private
focal_method.parameters: (SqlNode e, String alias)
focal_method.return: SqlCall
focal_method.signature: SqlCall as(SqlNode e, String alias)