Search code examples
sqlparquetapache-drill

Dir columns coming by default while querying parquet files in apache drill 1.20 versions


In the latest version of drill, the dir columns are coming by default when giving a 'select *' on a parquet file. Is there a way we can disable them?

The query: 'Select * from dfs.`C:\Sample.parquet` where EmpID <>'null''

The result for the above query is coming as:

dir0 | dir1 | dir2 | dir3 | EmpID

I just need the EmpID column. But the dir columns are coming by default. Tested in drill 1.20.1 and 1.20.2 as well. Same resultset.


Solution

  • the issue is fixed. If I changed the '\' to '/', then the result set is coming without any additional columns. Turns out '\' is an escape character in drill, which gives an unexpected result set. Not sure why it was not happening in earlier drill versions. Hope this helps. :)