Hi Kumar, You can take a look at some internal rules in Calcite: - push project to scan : https://github.com/apache/calcite/blob/289d08205584efefa7b399318e7bb81c4f7f11aa/core/src/main/java/org/apache/calcite/rel/rules/ProjectTableScanRule.java - push filter to scan : https://github.com/apache/calcite/blob/289d08205584efefa7b399318e7bb81c4f7f11aa/core/src/main/java/org/apache/calcite/rel/rules/FilterTableScanRule.java
And also some downstream projects' implementation such as Flink: - push limit to scan : https://github.com/apache/flink/blob/06688f345f6793a8964ec00002175f44cda13c33/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/PushLimitIntoTableSourceScanRule.java - push filter to scan : https://github.com/apache/flink/blob/06688f345f6793a8964ec00002175f44cda13c33/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/PushFilterIntoTableSourceScanRule.java - push project to scan : https://github.com/apache/flink/blob/06688f345f6793a8964ec00002175f44cda13c33/flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/rules/logical/PushProjectIntoTableSourceScanRule.java Kumar Ramaiyer <[email protected]> 于2023年5月17日周三 04:19写道: > Hello > > Calcite is an amazing tool. I am starting to get into it and would like > to expose SQL interface for our SaaS application. Goal is then to (1) > connect to any BI tool that our customers may have instead of having to > write to our proprietary API (2) Able to build a conversational AI > application. > > I went through all the videos and tutorials I could see (including the > Boss 21) on youtube. The Lucene based tutorial is pretty good till the > point of customer operator and custom rules. It looks fairly complicated > and I am not sure how I can translate that to our domain. > > I would like to see examples – if there are – for the following: > > > 1. Pushing the filter rule to our API > 2. Pushing the limit rule to our API > 3. Pushing the group by to our API > > I want to provide implementations for these. > > Thanks for your help. > > Regards > Kumar > -- Best, Benchao Li
