Skip to content

ExprFunctionOp: Inconsistent Element and Op after transforms #3253

Open
@Aklakan

Description

@Aklakan

Version

jena-5.5.0-SNAPSHOT

What happened?

Element and Op of E_Exists and E_NotExists become inconsistent after transform because Element is never updated. A syntax transform that renames variables in the Element thus has no effect.

The original code of these classes looks as follows:

public Expr copySubstitute(Binding binding)
{
    Op op2 = Substitute.substitute(getGraphPattern(), binding) ;
    return new E_NotExists(getElement(), op2) ; // !!! Element unchanged.
}
 
@Override
public Expr applyNodeTransform(NodeTransform nodeTransform)
{
    Op op2 = NodeTransformLib.transform(nodeTransform, getGraphPattern()) ;
    return new E_NotExists(getElement(), op2) ; /// Element unchanged.
}

Relevant output and stacktrace

Are you interested in making a pull request?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions