Improved project pushdown for optiq-csv

42 views
Skip to first unread message

Bruno Dumon

unread,
Mar 23, 2014, 4:37:47 PM3/23/14
to opti...@googlegroups.com
Hi,

The ProjectRel pushdown rule in the csv sample can only handle simple field selections. I tried to make an improved version that should be able to handle any query, my changes are here:


I'm not sure if this is suited to be included in the csv sample since it is a bit more complex (but not that much actually). Anyhow, this might be useful to someone else learning this stuff, and I also welcome any feedback as to whether I approached this the right way.

Bruno.

Vladimir Sitnikov

unread,
Apr 15, 2014, 2:39:18 AM4/15/14
to opti...@googlegroups.com, bruno...@gmail.com
This is great. Thank you for sharing.

I've tried it in a similar case and it just works. Amazing.

PS. It is hard to understand how all those toRel/Enumerable/Project/Trait things cooperate when you face optiq for the first time.
When I've opened optiq-csv, I could not pass through all those stuff, and there was no solid picture why need so RelType/Scan/Rule/etc stuff.
However optiq-csv is usable as a starter for learning/trying optiq.

I believe, it makes sense to include some step-by-step description (e.g. sequence diagram).

Damien Carol

unread,
Apr 15, 2014, 4:13:12 AM4/15/14
to opti...@googlegroups.com, bruno...@gmail.com
It would be great to add it to the tutorial of optiq-csv.

Julian Hyde

unread,
Apr 15, 2014, 5:58:57 PM4/15/14
to opti...@googlegroups.com, bruno...@gmail.com
I think it would make sense to have this as an additional rule, or maybe replace the existing pushdown rule. It really depends on what is more helpful for people learning optiq. That is the purpose of optiq-csv, after all.

Bruno,

Can you please create a pull-request for this? Otherwise I'll forget to look at it.

Julian


--
You received this message because you are subscribed to the Google Groups "optiq-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to optiq-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vladimir Sitnikov

unread,
Nov 22, 2014, 12:53:10 PM11/22/14
to opti...@googlegroups.com, bruno...@gmail.com
I've opened a JIRA case at https://issues.apache.org/jira/browse/CALCITE-477
Welcome to Calcite JIRA and/or dev @ calcite.incubator.apache.org and/or https://github.com/apache/incubator-calcite

Vladimir
Reply all
Reply to author
Forward
0 new messages