I am trying to read the columns from hive queries being executed by
implementing the ExecuteWithHookContext hook. This works fine by extracting
ColumnAccessInfo information from HiveContext (which is passed in)
.getQueryPlan().getColumnAccessInfo(). This provides access to
a TableToColumnAccessMap which has all the columns from the query in it
along with user information. So this works fine.

However when I run same queries on partition tables the list of columns
returned by TableToColumnAccessMap are not correct. It includes the
partition columns but ends up excluding some of the non-partioned columns.
So for a 5 column table with last 2 being partitioned columns it would
return 1 non-partioned and 2 partioned columns and simply ignore the other
two partitioned columns. Any ideas on what that might be the case or any
other ways on getting a handle on columns of a query being run.

Thanks
Adeel

Reply via email to