Skip to content

[CALCITE-1235] Push down LIMIT in unfiltered Cassandra queries#229

Closed
michaelmior wants to merge 5 commits intoapache:masterfrom
michaelmior:1235-cassandra-limit
Closed

[CALCITE-1235] Push down LIMIT in unfiltered Cassandra queries#229
michaelmior wants to merge 5 commits intoapache:masterfrom
michaelmior:1235-cassandra-limit

Conversation

@michaelmior
Copy link
Member

I'd appreciate someone if someone could review this before I merge to see if maybe there's a better way to accomplish what I'm trying to do. In the current version of the Cassandra adapter, some overly specific matching is necessary to push down sorts because information is needed from other parts of the operator tree. This means that the current match rule will only pushes down LIMIT if the query has a filter.

This patch adds two additional rules to help deal with LIMIT. The first pushes down EnumerableLimit and the second eliminates redundant adjacent CassandraSort operators which can now occur because one rule matches EnumerableLimit and the other matches Sort. They both can be handled by a single instance of operator so this makes the plan simpler.

@michaelmior michaelmior force-pushed the 1235-cassandra-limit branch from 7aca2e9 to e955fbb Compare May 19, 2016 09:51
@asfgit asfgit closed this in 4c89dce May 20, 2016
@michaelmior michaelmior deleted the 1235-cassandra-limit branch May 20, 2016 06:25
jamesstarr pushed a commit to jamesstarr/calcite that referenced this pull request Mar 16, 2026
apache#229)

…xpr as BIGINT) as INT) => intExpr

Co-authored-by: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
jamesstarr pushed a commit to jamesstarr/calcite that referenced this pull request Mar 16, 2026
apache#229)

…xpr as BIGINT) as INT) => intExpr

Co-authored-by: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant