[
https://issues.apache.org/jira/browse/JCR-3047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13084199#comment-13084199
]
Alex Parvulescu commented on JCR-3047:
--------------------------------------
I've seen the option with wrapping a Node in a Row just to use the
OperandEvaluator, but then it kinda feels hacky. Everything is there already.
The property name thing will make sense when you take a look at JCR-2959. I
couldn't find another way of extracting the property that is used by an
Operand. But you may be right, this could fail in certain scenarios.
I needed to build a lucene sort mechanism, and all the info you have is the
Ordering, which holds an Operand, and a bunch of nodes. As the sort should
happen before the Row is actually constructed.
Ok, there may be better ways of extracting this info, I'll digg into it
> OperandEvaluator should be able to handle Nodes as well, not just Rows
> ----------------------------------------------------------------------
>
> Key: JCR-3047
> URL: https://issues.apache.org/jira/browse/JCR-3047
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-jcr-commons
> Reporter: Alex Parvulescu
> Assignee: Alex Parvulescu
> Priority: Trivial
> Fix For: 2.3.0
>
> Attachments:
> 0001-JCR-3047-OperandEvaluator-should-be-able-to-handle-N.patch
>
>
> OperandEvaluator is used to evaluate Operands values against given Rows, and
> in an effort to improve the sorting part of SQL2 (JCR-2959), I need it to
> handle plain Nodes as well.
> This is a small change, as the OperandEvaluator already extracts the Node
> info from the Row, so there is no obvious reason no to expose the Node
> operations directly.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira