[ https://issues.apache.org/jira/browse/SOLR-8002?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15095511#comment-15095511 ]
Kevin Risden commented on SOLR-8002: ------------------------------------ [~joel.bernstein] Any reason to not always return a SelectStream instead of checking if there are columnAliases? I'm thinking about the JDBC implementation of get*() by index. The SelectStream can guarantee the tuples have the fields in the same order as the SQL statement. For example: select a, b, c from table; will result in tuple.get(0) being a, tuple.get(1) = b, etc. Without the SelectStream wrapping, the fields are in an arbitrary order. In addition to wrapping the result in SelectStream, this also requires that the columnAliases, reverseColumnAliases, and tuple.fields are LinkedHashMap instead of just plain HashMap to keep the keys in insertion order. I have a rough patch that has these changes just wasn't sure if it made sense to add to this or to a separate JIRA. > Add column 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 > > Attachments: SOLR-8002.patch, SOLR-8002.patch > > > 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