[ https://issues.apache.org/jira/browse/CALCITE-6619 ]
赵祥钰 deleted comment on CALCITE-6619:
------------------------------
was (Author: JIRAUSER307296):
I according to you provide AvaticaUtils instantiatePlugin, found ddlExecuter
can and before you write the DataSource jdbcSchema, When implementing the
XXXSchemaFactory's create method, the executor is passed in as a parameter,
which makes the code look simpler
{code:java}
public class PostgresqlSchemaFactory implements SchemaFactory {
@Override
public Schema create(SchemaPlus parentSchema, String name, Map<String,
Object> operand) {
final DataSource dataSource = initDataSource(operand);
final Expression expression =
parentSchema != null
? Schemas.subSchemaExpression(parentSchema, name,
JdbcCatalogSchema.class)
: Expressions.call(DataContext.ROOT,
BuiltInMethod.DATA_CONTEXT_GET_ROOT_SCHEMA.method);
final SqlDialect dialect = PostgresqlSqlDialect.DEFAULT;
final JdbcConvention convention = JdbcConvention.of(dialect,
expression, name);
PostgresqlDdlExecutor ddlExecutor = new PostgresqlDdlExecutor();
return new PostgresqlSchema(dataSource, dialect, convention, null,
"public", ddlExecutor);
}
} {code}
> DDL statement executor extension
> --------------------------------
>
> Key: CALCITE-6619
> URL: https://issues.apache.org/jira/browse/CALCITE-6619
> Project: Calcite
> Issue Type: New Feature
> Components: server
> Affects Versions: 1.37.0
> Reporter: 赵祥钰
> Priority: Major
>
> The current DDL actuator implementation code is written dead, and not
> according to the existing factory pattern design, I want to expand the
> implementation class of each module through Java Server Faces, DDL can be
> extended in mongodb, kafka, redis and other sub-modules, so that DDL is not
> limited to the statement parsing stage
> I give Demon for you to evaluate the feasibility
> ,[Demon|https://github.com/apache/calcite/compare/main...zhaoxiangyublzcat:calcite:Extended-ddl]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)