[
https://issues.apache.org/jira/browse/JENA-630?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rob Vesse resolved JENA-630.
----------------------------
Resolution: Fixed
Marked as Resolved Fixed (hopefully for real this time)
I essentially combined our two approaches, rather than fully replicating the
constant folding logic in {{ExprTransformConstantFold}} I instead added a check
in each call to see whether the function was even eligible for constant folding
and if not I just defer to {{super.transform()}} which is a straight copy and
never call {{copySubstitute()}}.
With this change in place we never attempt folding on ineligible expressions.
Your example of an expression where it was unnecessarily copied no longer shows
that behaviour in my testing.
> Do constant folding as part of query optimisation
> -------------------------------------------------
>
> Key: JENA-630
> URL: https://issues.apache.org/jira/browse/JENA-630
> Project: Apache Jena
> Issue Type: Improvement
> Components: ARQ
> Affects Versions: Jena 2.11.1
> Reporter: Rob Vesse
> Assignee: Rob Vesse
> Priority: Minor
> Fix For: Jena 2.11.2
>
> Attachments: DevMain.java, ExprTransformConstantFold.java
>
>
> Currently Jena does not automatically simplify expressions by constant
> folding even though the function API actually has support for this already
> baked into it.
> This issue will track work to integrate a transform for this into the
> standard optimiser.
--
This message was sent by Atlassian JIRA
(v6.2#6252)