Open GoogleCodeExporter opened 9 years ago
Yingyi,
Can you verify this issue and report the cause/fix?
Original comment by vinay...@gmail.com
on 6 Apr 2012 at 8:49
I believe there is a bug in the query. Our group-by is just too confusing :/
Before query:
for $o in dataset('MyData')
group by $o.id with $o
return $o.id
Notice that $o has been re-bound to the collection containing a group, and
hence the field access $o.id doesn't make sense because the field access
function does not work on collections (which is exactly what the error message
states).
A possible fix for this query is this:
for $o in dataset('MyData')
group by $id := $o.id with $o
return $id
Can we close this issue?
Original comment by alexande...@gmail.com
on 2 Aug 2012 at 4:12
I would take issue with "which is exactly what the error message states".
I would however (slightly grudgingly) agree with "which is exactly what the
error message really means". :-)
SERIOUSLY!
This error message, for an AQL user, will be next to impenetrable, despite its
internals-oriented technical correctness. We need something more like:
"Incorrect field access "$o.id" in return clause applied to variable $o bound
in with clause of group clause." (Preferable with positional information,
e.g., line and character position, to better pinpoint things.)
We also need an option to turn off stack tracing for end users (including
Khurram) so that ASTERIX users don't get those - and a way to turn them on in
the query header when things go wrong and one wants to file issues on them.
Our end users should not have to dig through the traces (and they should not be
part of the expected results) to see the crux of the errors - and they are too
much "Java noise".
TRANSLATION: ASTERIX errors should be given in ASTERIX user lingo.
Original comment by dtab...@gmail.com
on 2 Aug 2012 at 2:21
Alright. This is a bigger fix then, because *all* our error messages are
internals-oriented.
Original comment by alexande...@gmail.com
on 2 Aug 2012 at 8:37
Yingyi/Alex/Sattam - What is the status of this issue ?
Original comment by khfaraaz82
on 19 Nov 2012 at 3:55
After the above discussion I don't know what it means to fix this issue
properly.
Constructing the error message that Mike wants is very, very difficult. If that
is the expected solution, then I don't know when we can implement it.
Original comment by alexande...@gmail.com
on 19 Nov 2012 at 9:36
Here is a compromise:
Change the error message returned by the asterix:field-access-by-name when
trying to access a field in a non-record (a list in this case), to say
something like:
Field Accessor for `id' cannot be applied to a <non-record type>. Type of
input: <pretty printed input type>
Replace the <..> with concrete values while generating the error message.
Original comment by vinay...@gmail.com
on 19 Nov 2012 at 9:47
Sounds good to me.
Original comment by alexande...@gmail.com
on 19 Nov 2012 at 9:56
Original comment by vinay...@gmail.com
on 10 May 2013 at 7:05
Vinayak - my understanding is that you are putting in place the generic more
end-user-friendly exception reporting soon - what's your ETA for that - and
when you have that done could you please update THIS issue with the new
still-internally-oriented error message? This will be an interesting test case
for that. thx!
Original comment by dtab...@gmail.com
on 14 May 2013 at 11:13
Original comment by vinay...@gmail.com
on 17 May 2013 at 7:36
Add documentation for grouping to reduce probability for user errors.
Original comment by westm...@gmail.com
on 17 May 2013 at 7:38
Original comment by westm...@gmail.com
on 17 May 2013 at 7:46
Original comment by westm...@gmail.com
on 28 May 2013 at 5:51
The documentation for grouping is in.
Changing the error message as proposed by Vinayak in comment #7 is not a
BetaBlocker.
Original comment by westm...@gmail.com
on 4 Jun 2013 at 9:03
Original issue reported on code.google.com by
salsuba...@gmail.com
on 14 Mar 2012 at 1:58Attachments: