[
https://issues.apache.org/jira/browse/CASSANDRA-9532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14580835#comment-14580835
]
Sam Tunnicliffe commented on CASSANDRA-9532:
--------------------------------------------
I've pushed more complete versions for 2.0 through to trunk. As well as the
mods already discussed here, I've made a couple more things accessible that
{{QueryHandler}} impls may want to inspect. These are all related to the
statement's restrictions and/or limit. Where something has been made accessible
that was previously private, I've left the field itself private and added a
public getter. While this is more verbose, I'm wary of the scenario where at
some point in the future, we notice that a public field is never accessed
outside of the class and so switch it back to private, breaking any external
code depending on it. A public method is a clearer indicator of the intent to
expose it.
* trunk
**
[diff|https://github.com/apache/cassandra/compare/trunk...beobal:9532-trunk.patch]
** [unit
tests|http://cassci.datastax.com/view/Dev/view/beobal/job/beobal-9532-trunk-testall/]
**
[dtests|http://cassci.datastax.com/view/Dev/view/beobal/job/beobal-9532-trunk-dtest/]
* 2.2
**
[diff|https://github.com/apache/cassandra/compare/cassandra-2.2...beobal:9532-2.2.patch]
** [unit
tests|http://cassci.datastax.com/view/Dev/view/beobal/job/beobal-9532-2.2-testall/]
**
[dtests|http://cassci.datastax.com/view/Dev/view/beobal/job/beobal-9532-2.2-dtest/]
* 2.1
**
[diff|https://github.com/apache/cassandra/compare/cassandra-2.1...beobal:9532-2.1.patch]
** [unit
tests|http://cassci.datastax.com/view/Dev/view/beobal/job/beobal-9532-2.1-testall/]
**
[dtests|http://cassci.datastax.com/view/Dev/view/beobal/job/beobal-9532-2.1-dtest/]
* 2.0
**
[diff|https://github.com/apache/cassandra/compare/cassandra-2.0...beobal:9532-2.0.patch]
** [unit
tests|http://cassci.datastax.com/view/Dev/view/beobal/job/beobal-9532-2.0-testall/]
**
[dtests|http://cassci.datastax.com/view/Dev/view/beobal/job/beobal-9532-2.0-dtest/]
> Provide access to select statement's real column definitions
> ------------------------------------------------------------
>
> Key: CASSANDRA-9532
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9532
> Project: Cassandra
> Issue Type: Improvement
> Reporter: mck
> Assignee: mck
> Fix For: 3.x, 2.1.x, 2.0.x, 2.2.x
>
> Attachments: 9532-2.0-v2.txt, 9532-2.1-v2.txt, 9532-2.2-v2.txt,
> 9532-trunk-v2.txt, cassandra-2.0-9532.txt, cassandra-2.1-9532.txt,
> cassandra-2.2-9532.txt, trunk-9532.txt
>
>
> Currently there is no way to get access to the real ColumnDefinitions being
> used in a SelectStatement.
> This information is there in
> {{selectStatement.selection.columns}} but is private.
> Giving public access would make it possible for third-party implementations
> of a {{QueryHandler}} to work accurately with the real columns being queried
> and not have to work-around column aliases (or when the rawSelectors don't
> map directly to ColumnDefinitions, eg in Selection.fromSelectors(..), like
> functions), which is what one has to do today with going through
> ResultSet.metadata.names.
> This issue provides a very minimal patch to provide access to the already
> final and immutable fields.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)