Dandandan opened a new pull request #213:
URL: https://github.com/apache/arrow-datafusion/pull/213
# Which issue does this PR close?
Closes #206
# Rationale for this change
`LIMIT 0` can be used to test a certain query / get the schema from a query
or the value `0` can result from a constant folding. This rule replaces the
limit 0 by an empty plan, saving time in the physical planner (no need to read
metadata/statistics/partitions etc) and there is no need to produce a single
batch.
# What changes are included in this PR?
A new optimization pass to replace `LIMIT 0` in the `LogicalPlan` with an
`EmptyRelation`, with the same schema.
# Are there any user-facing changes?
No breaking changes, should only be faster in some cases.
--
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]