Search in sources :

Example 1 with CalciteSqlDialect

use of org.apache.calcite.sql.dialect.CalciteSqlDialect in project flink by apache.

the class SqlToOperationConverter method getQuotedSqlString.

private String getQuotedSqlString(SqlNode sqlNode) {
    SqlParser.Config parserConfig = flinkPlanner.config().getParserConfig();
    SqlDialect dialect = new CalciteSqlDialect(SqlDialect.EMPTY_CONTEXT.withQuotedCasing(parserConfig.unquotedCasing()).withConformance(parserConfig.conformance()).withUnquotedCasing(parserConfig.unquotedCasing()).withIdentifierQuoteString(parserConfig.quoting().string));
    return sqlNode.toSqlString(dialect).getSql();
}
Also used : CalciteSqlDialect(org.apache.calcite.sql.dialect.CalciteSqlDialect) SqlParser(org.apache.calcite.sql.parser.SqlParser) CalciteSqlDialect(org.apache.calcite.sql.dialect.CalciteSqlDialect) SqlDialect(org.apache.calcite.sql.SqlDialect)

Aggregations

SqlDialect (org.apache.calcite.sql.SqlDialect)1 CalciteSqlDialect (org.apache.calcite.sql.dialect.CalciteSqlDialect)1 SqlParser (org.apache.calcite.sql.parser.SqlParser)1