Apache Drill Data Source Limitations

if the CAST function uses any non-table column as an argument, then the database returns an empty result set through JDBC. Non-table columns are for example, NULL or string literal.

For example, it is best to rewrite the following query:

select cast(null as varchar) a13 
from /shared/postgreDrill/DRILL/"postgres.ga"/all_datatype_1k as table1

As:

select cast(null as varchar) a13, id
from /shared/postgreDrill/DRILL/"postgres.ga"/all_datatype_1k as table1