[
https://issues.apache.org/jira/browse/CALCITE-2866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Hongze Zhang updated CALCITE-2866:
----------------------------------
Description:
I am inclined to believe that the customization of SqlValidator /
SqlToRelConverter in downstream projects is something normal.
E.g. Following are some examples (not all) of extended SqlValidator or
SqlToRelConverter from other projects that are using Calcite as query planner :
# DrillValidator
[https://github.com/apache/drill/blob/4627973bde9847a4eb2672c44941136c167326a1/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/SqlConverter.java#L249]
# FlinkCalciteSqlValidator
[https://github.com/apache/flink/blob/master/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/calcite/FlinkCalciteSqlValidator.scala#L31]
# DremioSqlToRelConverter
[https://github.com/dremio/dremio-oss/blob/master/sabot/kernel/src/main/java/com/dremio/exec/planner/sql/DremioSqlToRelConverter.java#L40]
# (Dremio) SqlValidatorImpl
[https://github.com/dremio/dremio-oss/blob/master/sabot/kernel/src/main/java/com/dremio/exec/planner/sql/SqlValidatorImpl.java#L32]
tools/Planner.java[1] is a good tool for utilizing. However currently there are
no way to use Frameworks.getPlanner() directly if the two class need to be
customized[1][2].
[1]
[https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java#L232]
[2]
[https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java#L184]
was:
I am inclined to believe that the customization of SqlValidator /
SqlToRelConverter in downstream projects is something normal.
E.g. Following are some examples (not all) of extended SqlValidator or
SqlToRelConverter from other projects that are using Calcite as query planner :
# DrillValidator
[https://github.com/apache/drill/blob/4627973bde9847a4eb2672c44941136c167326a1/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/SqlConverter.java#L249]
# FlinkCalciteSqlValidator
[https://github.com/apache/flink/blob/master/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/calcite/FlinkCalciteSqlValidator.scala#L31]
# DremioSqlToRelConverter
[https://github.com/dremio/dremio-oss/blob/master/sabot/kernel/src/main/java/com/dremio/exec/planner/sql/DremioSqlToRelConverter.java#L40]
# (Dremio) SqlValidatorImpl
[https://github.com/dremio/dremio-oss/blob/master/sabot/kernel/src/main/java/com/dremio/exec/planner/sql/SqlValidatorImpl.java#L32]
However currently there are no way to use Frameworks.getPlanner() directly if
the two class need to be customized[1][2].
[1]
[https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java#L232]
[2]
[https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java#L184]
> Allow passing factory of SqlValidator / SqlToRelConverter into FrameworkConfig
> ------------------------------------------------------------------------------
>
> Key: CALCITE-2866
> URL: https://issues.apache.org/jira/browse/CALCITE-2866
> Project: Calcite
> Issue Type: Improvement
> Components: core
> Reporter: Hongze Zhang
> Assignee: Hongze Zhang
> Priority: Major
> Labels: usability
>
> I am inclined to believe that the customization of SqlValidator /
> SqlToRelConverter in downstream projects is something normal.
> E.g. Following are some examples (not all) of extended SqlValidator or
> SqlToRelConverter from other projects that are using Calcite as query planner
> :
> # DrillValidator
>
> [https://github.com/apache/drill/blob/4627973bde9847a4eb2672c44941136c167326a1/exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/SqlConverter.java#L249]
> # FlinkCalciteSqlValidator
>
> [https://github.com/apache/flink/blob/master/flink-table/flink-table-planner/src/main/scala/org/apache/flink/table/calcite/FlinkCalciteSqlValidator.scala#L31]
> # DremioSqlToRelConverter
>
> [https://github.com/dremio/dremio-oss/blob/master/sabot/kernel/src/main/java/com/dremio/exec/planner/sql/DremioSqlToRelConverter.java#L40]
> # (Dremio) SqlValidatorImpl
>
> [https://github.com/dremio/dremio-oss/blob/master/sabot/kernel/src/main/java/com/dremio/exec/planner/sql/SqlValidatorImpl.java#L32]
> tools/Planner.java[1] is a good tool for utilizing. However currently there
> are no way to use Frameworks.getPlanner() directly if the two class need to
> be customized[1][2].
>
> [1]
> [https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java#L232]
> [2]
> [https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/prepare/PlannerImpl.java#L184]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
