guimingyue commented on issue #8284: URL: https://github.com/apache/shardingsphere/issues/8284#issuecomment-744020402
@tristaZero I have created a calcite Schema implementation class [ShardingSphereCalciteSchema](https://github.com/guimingyue/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-optimizer/src/main/java/org/apache/shardingsphere/infra/optimizer/schema/ShardingSphereCalciteSchema.java), I think this class is enough for the optimization phase. With the last two weeks of work, I have finished some work of SQLStatement transformation, But it's still on the way. This is the test case [SqlNodeConverterTest](https://github.com/guimingyue/shardingsphere/blob/master/shardingsphere-infra/shardingsphere-infra-optimizer/src/test/java/org/apache/shardingsphere/infra/optimizer/SqlNodeConverterTest.java). At the same time, I'm also digging into the HepPlanner and VolcanoPlanner to figure out how it works. @tristaZero @junwen12221 I'm wondering whether the calcite raw executor is a good choice for sharding tables, according to [ the optimizer design document of Mycat2.0 ](https://github.com/MyCATApache/Mycat2/blob/master/doc/104-optimizer.md) and this paragraph. > 参数化的MycatView MycatView这个名字参考阿里DRDS的View算子,在Mycat2第一代引擎有类似的东西,叫做MycatTransientSQLTableScan,一种临时的TableScan,它以sql字符串和数据源信息来构造。而MycatView使用关系表达式与数据分布来表示,数据分布包含两类,一种是具体的,他们就是已经包含具体物理表的信息。一种是需要赋以参数值才可以得到具体信息,如果不,只能得到全表扫描信息,也就是说,MycatView计算物理表可以是惰性计算的。理想情况下,一个参数化的关系表达式,不同的参数值能影响它扫描分表数量。 ---------------------------------------------------------------- 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]
