[ https://issues.apache.org/jira/browse/SOLR-8512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Risden updated SOLR-8512: ------------------------------- Attachment: sql-preserve-order.patch Adding some notes here after thinking about this in relation to SOLR-8002 and a rough idea patch. Any reason to not always return a SelectStream from SQL handler instead of checking if there are columnAliases? 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. > Implement minimal set of get* methods in ResultSetImpl for column indices > ------------------------------------------------------------------------- > > Key: SOLR-8512 > URL: https://issues.apache.org/jira/browse/SOLR-8512 > Project: Solr > Issue Type: Sub-task > Components: SolrJ > Affects Versions: Trunk > Reporter: Kevin Risden > Attachments: sql-preserve-order.patch > > > SQL clients use the proper get* methods on the ResultSet to return items to > be displayed. At minimum, the following methods should be implemented for > column index: > * public Object getObject > * public String getString > * public boolean getBoolean > * public short getShort > * public int getInt > * public long getLong > * public float getFloat > * public double getDouble > * public BigDecimal getBigDecimal > * public Date getDate > * public Time getTime > * public Timestamp getTimestamp -- 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