Java Code Examples for org.apache.calcite.sql.parser.SqlParserImplFactory

The following examples show how to use org.apache.calcite.sql.parser.SqlParserImplFactory. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: dremio-oss   Source File: ParserConfig.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public SqlParserImplFactory parserFactory() {
  if (supportFullyQualifiedProjections) {
    return ParserImpl.FACTORY;
  }
  return ParserWithCompoundIdConverter.FACTORY;
}
 
Example 2
Source Project: flink   Source File: FlinkSqlParserFactories.java    License: Apache License 2.0 5 votes vote down vote up
public static SqlParserImplFactory create(SqlConformance conformance) {
	if (conformance == FlinkSqlConformance.HIVE) {
		return FlinkHiveSqlParserImpl.FACTORY;
	} else {
		return FlinkSqlParserImpl.FACTORY;
	}
}
 
Example 3
Source Project: flink   Source File: FlinkDDLDataTypeTest.java    License: Apache License 2.0 5 votes vote down vote up
private static SqlParser.Config createParserConfig(Map<String, Object> options) {
	return SqlParser.configBuilder()
		.setQuoting((Quoting) options.get("quoting"))
		.setUnquotedCasing((Casing) options.get("unquotedCasing"))
		.setQuotedCasing((Casing) options.get("quotedCasing"))
		.setConformance((SqlConformance) options.get("conformance"))
		.setCaseSensitive((boolean) options.get("caseSensitive"))
		.setParserFactory((SqlParserImplFactory) options.get("parserFactory"))
		.build();
}
 
Example 4
Source Project: calcite   Source File: CalcitePrepareImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override public void executeDdl(Context context, SqlNode node) {
  final CalciteConnectionConfig config = context.config();
  final SqlParserImplFactory parserFactory =
      config.parserFactory(SqlParserImplFactory.class, SqlParserImpl.FACTORY);
  final DdlExecutor ddlExecutor = parserFactory.getDdlExecutor();
  ddlExecutor.executeDdl(context, node);
}
 
Example 5
Source Project: Bats   Source File: DrillParserConfig.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public SqlParserImplFactory parserFactory() {
  return DrillParserWithCompoundIdConverter.FACTORY;
}
 
Example 6
Source Project: flink   Source File: FlinkSqlParserImplTest.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected SqlParserImplFactory parserImplFactory() {
	return FlinkSqlParserImpl.FACTORY;
}
 
Example 7
Source Project: flink   Source File: FlinkHiveSqlParserImplTest.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected SqlParserImplFactory parserImplFactory() {
	return FlinkHiveSqlParserImpl.FACTORY;
}
 
Example 8
Source Project: flink   Source File: FlinkSqlParserImplTest.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected SqlParserImplFactory parserImplFactory() {
	return FlinkSqlParserImpl.FACTORY;
}
 
Example 9
Source Project: calcite   Source File: BabelParserTest.java    License: Apache License 2.0 4 votes vote down vote up
@Override protected SqlParserImplFactory parserImplFactory() {
  return SqlBabelParserImpl.FACTORY;
}
 
Example 10
Source Project: calcite   Source File: ServerParserTest.java    License: Apache License 2.0 4 votes vote down vote up
@Override protected SqlParserImplFactory parserImplFactory() {
  return SqlDdlParserImpl.FACTORY;
}
 
Example 11
Source Project: calcite   Source File: ExtensionSqlParserTest.java    License: Apache License 2.0 4 votes vote down vote up
@Override protected SqlParserImplFactory parserImplFactory() {
  return ExtensionSqlParserImpl.FACTORY;
}