Skip to content

How to get Alias to Column/Expression map #1526

Answered by imro2
imro2 asked this question in Q&A
Discussion options

You must be logged in to vote

I was able to do it by adding two maps. One would map object to SelectExcpressionItem and would be updated as the visitor descended through the structure so I am always able to tell which SelectExpressionItem is the root of the current branch and then a map to keep track of SelectExpressionItems to a list of columns it has encountered on the way. As noted elsewhere I had to implement retrieval of column names from schema for cases like AllColumns and AllTableColumns.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by imro2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants