tristaZero commented on issue #8284:
URL: https://github.com/apache/shardingsphere/issues/8284#issuecomment-740564112


   Hi @junwen12221 ,
   Glad to see your explanation. 
   
   > Calcite JDBC Driver provides some default advanced features including 
lattice,Materialized Views.Or you can use
   
   I suppose these features are far away from us since currently we just focus 
on the adaptor, rules optimization, and the conversion between parsed result 
and `relNode`. Nevertheless, `Frameworks` is a handy tool including `parser`, 
`validator` and `RelConverter`.
   
   @guimingyue  @junwen12221 
   
   Speaking of `Adaptor` (Federated SQL), I suggest we implement the interface 
`ProjectableFilterableTable` initially to run through the whole process well. 
Next, we can import `TranslatableTable` for furthermore optimization. 
   
   When it comes to `Query Optimization`, from my perspective, there are two 
aspects for our consideration (Give it a notice here @guimingyue ).
   
   - Apply some of `CoreRules` and `EnumerableRules` to perform logical 
transformations on relational expressions
   - Implement `TranslatableTable` to register custom rules (Like CoreRules)
   
   **Notice**, The conversion from the SQLStatement of ShardingSphere parser to 
SqlNode of Calcite is a prerequisite for broad SQL support.
   
   Please be free to share your views on the content above. : ) 
   
   BTW, I updated [federatedSQL](https://github.com/tristaZero/federatedSQL) 
project with a non-generated-code converter to avoid `janino debug`, welcome 
your check-out. Moreover, I am going to post a summary or blog about `How does 
Calcite handle a SQL?` afterward. But...please leave me some more time...
   
   @guimingyue How are you going? If you want to try to write something about 
query optimization, our federatedSQL repo is the right place, I guess. :)
   
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to