Clone
Abhishek Ravi <abhi.ravi@gmail.com>
committed
on 04 Jan
DRILL-6918: Skip ensureAtLeastOneField when there are no records
If none of the project / filter columns, exist in the vector, ensureAtLeast… Show more
DRILL-6918: Skip ensureAtLeastOneField when there are no records

If none of the project / filter columns, exist in the vector, ensureAtLeastOneField (or the Scan operator) adds at least one field as nullable integer (or nullable varchar if `allTextmode` is enabled).

The downstream Filter operator would then go on to fail with `NumberFormatException` because it tries to convert empty fields to integers.

Since ensureAtLeastOneField is called after reading all the messages in a batch, it can be skipped if the batch is empty.

closes #1595

Show less