uber / queryparser

Parsing and analysis of Vertica, Hive, and Presto SQL.
MIT License
1.08k stars 147 forks source link

Column usage doesn't include hive struct accessors #11

Open h4v0kh3l1 opened 7 years ago

h4v0kh3l1 commented 7 years ago

For tables where the majority of 'columns' are abstracted under a top-level column, e.g. body or msg, we don't surface the struct accessor as the column name, rendering analysis of these queries unusable.

Ideally, if we had a msg.name, msg.attrs.foo, msg.attrs.bar struct, we'd see the leaf struct names as the column name, i.e. msg.name, msg.attrs.foo, etc. Instead, we currently see msg for all of them.

h4v0kh3l1 commented 6 years ago

This is already captured in parsing, just needs to add to the usage analysis.