queryparser icon indicating copy to clipboard operation
queryparser copied to clipboard

Table aliases not supported?

Open tuulos opened this issue 6 years ago • 1 comments

Are table aliases like a in FROM some_table a supported?

For example

> demoAllAnalyses "select a.x from some_table a"
Tables accessed:
    public.some_table
Columns accessed by clause:
    <unknown>.a.x       SELECT
Joins:
    no joins
Table lineage:
    no tables modified

In this case, is it possible to resolve <unknown> to some_table?

tuulos avatar Mar 12 '18 20:03 tuulos

Hey @tuulos ,

Yes, we intend to support resolving aliases in column access, we have table alias resolution but it looks like this particular case slipped under the radar.

This example provided will have different behavior, since some_table doesn't exist in the catalog, and the resolve step reverts to defaulting. However, if you swap in foo, which is defined in the demo catalog, you'll get the same behavior.

h4v0kh3l1 avatar Mar 13 '18 20:03 h4v0kh3l1