The primary motivation of this is that if like us you are intercepting queries 
and providing your own processing you have no visibility back to the original 
query string since at the level of QueryExecutionFactory and query execution 
you have only a Query object and an algebra object

In our architecture queries may be very long running so we have a queue into 
which we give users visibility but right now we can only show them the 
serialized form of their parsed query.  Due to the nice syntax printing and 
possible optimization ARQ does on the query that serialized form may look very 
different and users are confused
by this.

The ability to preserve comments is of particular interest because we may want 
to use comments as a means to tag queries to indicate where they originated 
from.  Right now the only other mechanism that would let us do this would be to 
define a fake prefix which encodes this (perhaps with tag URLs) but that only 
covers one use case and still doesn't allow us to preserve more free form 
description of the queries in the form of comments.

Rob


On Apr 10, 2012, at 1:06 AM, Andy Seaborne wrote:

> On 10/04/12 01:15, rve...@apache.org wrote:
>> Author: rvesse
>> Date: Tue Apr 10 00:15:25 2012
>> New Revision: 1311528
>> 
>> URL:http://svn.apache.org/viewvc?rev=1311528&view=rev
>> Log:
>> Adding ability to preserve the raw query string in a Query object which is 
>> useful for applications which need to inspect the original user input (e.g. 
>> for comments etc).
> 
> Rob,
> 
> Could you provide some context for this?
> 
> (I wonder if this is the best way of handling comments, especially ones at 
> the start of the query.)
> 
>       Andy

Reply via email to