You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/12/07 16:03:02 UTC

[GitHub] [shardingsphere] junwen12221 edited a comment on issue #8284: [New feature] Federated SQL query and Query optimization are going to sail out.

junwen12221 edited a comment on issue #8284:
URL: https://github.com/apache/shardingsphere/issues/8284#issuecomment-740010520


   @tristaZero 
   
   CoreRules:Just rules that perform logical(not physical,Iterable) transformations on relational expressions.Generally used for RBO.This step mainly applies some heuristic rules, which are rule-based optimizer (RBO), so it is often called RBO stage.
   
   It is possible to implement the custom adaptor for federated queries.
   Yes.
   
   We need to consider SQL optimization. If we use Calcite JDBC Driver, the only way to affect the optimization process is to override the interface for different kinds of tables like TranslatableTable and provide RelOptRule.
   Yes.
   
   On the other hand, we may try to skip Calcite JDBC Driver and call the parse, validate, optimize and execute functions in our new custom execute Driver, which needs a in-depth understanding about the source code of Calcite and coding work.
   
   Calcite JDBC Driver provides some default advanced features including
   lattice,Materialized Views.Or you can use
   ```
   org.apache.calcite.tools.FrameworkConfig
   org.apache.calcite.tools.Frameworks
   org.apache.calcite.prepare.PlannerImpl
   ```
   
   It may maintain the function of calcite jdbc driver, but it is not JDBC interface.
   
   (adapter)https://calcite.apache.org/docs/adapter.html
   (lattice)https://calcite.apache.org/docs/lattice.html
   (Materialized Views)https://calcite.apache.org/docs/materialized_views.html#materialized-views-maintained-by-calcite
   
   By 3, we can use our parser engine to parse SQL instead of Calcite parser, providing a broad SQL support as our SQL parser can parse SQLs from different databases dialects.
   
   On the whole, it can be achieved.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org