[
https://issues.apache.org/jira/browse/QPID-8104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16371191#comment-16371191
]
Keith Wall edited comment on QPID-8104 at 2/21/18 10:28 AM:
------------------------------------------------------------
My characterisation of the problem is incorrect. The {{orderBy}} clause does
not currently support aliases. The
{{ConfiguredObjectQuery.OrderByComparator#OrderByComparator}} constructor makes
provision for numeric column indexes by substituting the numeric expression
with the corresponding expression from the select clause. It does not make
similar provision for aliases. I think this is the defect. It should use the
{{HeadersAndValueExpressions}} to work out if the order by clause refers to a
named expression within the select clause, and if so, it should substitute the
expression in the same was as it does for numeric column index processing.
was (Author: k-wall):
My characterisation of the problem is incorrect. The {{orderBy}} clause does
not currently support aliases. The
{{ConfiguredObjectQuery.OrderByComparator#OrderByComparator}} constructor makes
previous for numeric column indexes by substituting the numeric expression with
the corresponding expression from the select clause. It does not make similar
provision for aliases. I think this is the defect. It should use the
{{HeadersAndValueExpressions}} to work out if the order by clause refers to a
named expression within the select clause, and if so, it should substitute the
expression in the same was as it does for numeric column index processing.
> [Broker-J] [Query] [WMC] Ordering connections tables by port column fails
> with '422 - The orderBy expression at position '0' is unsupported'
> --------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: QPID-8104
> URL: https://issues.apache.org/jira/browse/QPID-8104
> Project: Qpid
> Issue Type: Bug
> Components: Broker-J
> Reporter: Keith Wall
> Priority: Minor
>
> Ordering the connections table on the virtualhost tab by port ends with error
> {{422 - The orderBy expression at position '0' is unsupported}}.
> The select clause in question uses an alias {{port.name AS port}}. In
> general the ability to express an the order by in terms of column aliases is
> supported however, the issue here seems to be that {{port}} is ambiguous and
> could refer to the {{Collection#port}} attribute or the alias.
> The user of the query API can workaround by using a column number, or specify
> the column's expression rather than alias.
> I have not looked into this further.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]