afs commented on issue #3040:
URL: https://github.com/apache/jena/issues/3040#issuecomment-2692145400

   >     String queryString = """
   >             PREFIX : <http://example/>
   > 
   >             SELECT ?a WHERE {
   >                 VALUES ?a { :q }
   >             }
   >         """;
   
   As @Aklakan says, the rules for what can and can't be safely renamed have 
changed.
   
   > @afs Is this the expected behavior of QueryTransformOps that it rejects 
this kind of simple rename?
   
   No. I don't see any reason not to support it.
   
   The primary use case is rename of variable to constant, e.g. a parameterized 
query.
   
   A constant is illegal in the `VALUES`, or "assigned as" in `BIND` . The code 
isn't dealing with the case where the rename is variable to variable.
   
   Aside: Variable to variable happens already to manage the scope of variables 
in sub-queries (they end up internally with non-clshing names like `?/v`) but 
that is in different code that preceded `QueryTransformOps.transform`.
   
   One way might be (internally) split to the map into "variable to variable" 
and "variable to constant" rather than have code with a lot of "ifs" in it.
   
   @qmj0923 Thank you for the report.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to