Skip to content
Commit ad2acca3 authored by gmantele's avatar gmantele
Browse files

[ADQL] Fix recursive replacement using SimpleReplaceHandler.

Before correction, if an ADQlObject (e.g. a function or a sub-query) contains
another ADQLObject and that both (i.e. parent and child) are matching in a
SimpleReplaceHandler and are asked to be replaced, only the parent
seemed to have been replaced. However, the child has been replaced, but
in the former instance of the parent ; and so its replacement is not
visible in the final query.

For instance:
if all mathematical functions must be replaced by a dumb UDF named 'foo' in
the ADQL query:
        "SELECT sqrt(abs(81)) FROM myTable"
,the result should be:
        "SELECT foo(foo(81)) FROM myTable"
,but before this correction it was:
        "SELECT foo(abs(81)) FROM myTable".
parent b8138111
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment