See if this is readable (from a different mailer)
> Ray, what is wrong with the ability to define prefixes for any given
> subquery? We allow in XCQL. Why not in CQL as well? It may sound
> complex, but the CQL parsers I know of - all have this capability.
I'll
> repeat (more or less what Rob wrote way back), the ability to define
> prefixes for "sub queries" makes it easy to combine them. If you
have
> two arbitrary queries a and b and want to combine them, it becomes
> rather tricky with up-front prefixes only. First you have parse the
> front of a, then front of b. Then collect the prefixes, then
possibly
> rename the prefixes inside a, then b to avoid conflicts. For
example,
> had you had the two queries:
> >dc="core-v1" dc.title=first
> >dc="core-v2" dc.title=second
> you would have to tranform that to something like:
> >dc1="core-v1" >dc2="core-v2" dc1.title=first and dc2.title=second
>
> Allow me to repeat the grammar in used by parsers and semantics for
it:
>
> search-clause ::= ">" [identifier "="] term cql-query
Does this produce unambiguous cql?
Consider:
(And I think I have my email settings corrected. We'll see.)
>dc1="core-v1" dc1.title=first and dc1.title=second
Is the second dc1 governed by the first assignment? If so, is that
because
the first assignment is "global" (and if so how do we know that) or
because
it is the most recent assignment for dc1?
How about:
>dc1="core-v1" dc1.title=first and >dc1="core-v1a" dc1.title=second
and dc1.title=third
The third occurence of dc1 -- is it governed by the first or second
assignment?
I suppose the only workable rule is that a prefix in a search clause
without
an assignment is governed by the most recent assignment for that
prefix
(thus no global assignment at the beginning of the query).
Anyway, I don't have any objection to this as long as we know (and
agree
with) the semantics.
--Ray
|