Hey Guys,

When reviewing our code I ran across this code:

https://github.com/apache/drill/blob/master/exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillScanRel.java#L70

The problem with this code is it converts no columns into every column.
This means we waste a bunch of time readers where we don't need to project
any columns.  An example is select count(*) which turns into select
count(0).  In that case, we should avoid projecting any columns other than
a count column.  However, because we translate no columns into every
column, we read way more than we should.  I remember someone (maybe Hanifi)
working through some rules around not allowing a blank list of columns
anywhere.  What was the thinking and how do we correct.  We should treat an
empty list different from a null list different from an all list.

thoughts?

Reply via email to