THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
We propose the following interfaces:
- Parser
- ExtendedOperationExecutor
- DialectFactoryParserFactory
- CatalogRegistry
- OperationTreeBuilder
...
Code Block | ||
---|---|---|
| ||
/** Provides methods for parsing SQL objects from a SQL string. */ @PublicEvolving public interface Parser { // the interface has existed in current codebase, here we just expose it. } |
ExtendedOperationExecutor
Code Block | ||
---|---|---|
| ||
/**
* An extended operation executor which provides method for executing operation. External pluggable
* dialect can implement this interface to execute operation in its own way instead of using Flink's
* own implementation for operation execution.
*/
@PublicEvolving
public interface ExtendedOperationExecutor {
/**
* Execute the given operation and return the execution result. This method will delegate
* Flink's own operation execution.
*
* <p>If return Optional.empty(), the operation will then fall to Flink's operation execution.
*/
Optional<TableResult> executeOperation(Operation operation);
} |
...
ParserFactory
Code Block | ||
---|---|---|
| ||
/** * Factory that creates {@link Parser} and {@link ExtendedOperationExecutor}. * * <p>The {@link #factoryIdentifier()} is identified by matching it against {@link * TableConfigOptions#TABLE_SQL_DIALECT}. */ @PublicEvolving public interface DialectFactoryParserFactory extends Factory { /** Creates a new parser. */ Parser create(Context context); /** Context provided when a parser is created. */ @PublicEvolving interface Context { CatalogRegistry getCatalogRegistry(); // interfaces provided dealing with get catalog, qulify identifier, etc. OperationTreeBuilder getOperationTreeBuilder(); // interfaces provided to build Operation. } } |
...