[ 
https://issues.apache.org/jira/browse/SOLR-8002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15093218#comment-15093218
 ] 

Joel Bernstein commented on SOLR-8002:
--------------------------------------

I've been mulling over the best way to implement alias support. Here is one 
possibility:

1) During the parsing collect the field -> alias map and alias->field map. 
We'll need both directions for the implementation. Attach these maps to the 
SQLVisitor.
2) Wrap the outer most TupleStream in a SelectStream that includes field -> 
alias translation. This will take care of outputing the column aliases in the 
Tuple.
3) Add reverse alias translation to the ORDER BY, GROUP BY, and HAVING clauses. 
 This will support using column alias's in these clauses. 

> Add field alias support to the Parallel SQL Interface 
> ------------------------------------------------------
>
>                 Key: SOLR-8002
>                 URL: https://issues.apache.org/jira/browse/SOLR-8002
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>    Affects Versions: Trunk
>            Reporter: Susheel Kumar
>            Assignee: Joel Bernstein
>             Fix For: 6.0
>
>
> Currently field aliases are not supported for SQL queries against SQL 
> Handler. E.g. below SQL query
>  select id,name as product_name from techproducts limit 20
> currently fails as data returned contains still "name" as the field/column 
> key than product_name



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to