Description
Currently you can alias a fields in two ways that I am aware of:
select field1 a from default
select field1 AS a from default
However the first way of aliasing opens up the user to confusing issues if there is a typo in the query. For example:
default bucket with documents like {"a":10, "b":20}
query select a, b from default
returns: [
{"a":10,"b":20}]
If there was a missing comma typo in the query, the query becomes:
select a b from default
which thinks that I am aliasing a AS b and returns the following:
[
]
This type of error is pretty common and the debug is very confusing because not only do the wrong number of fields show up (implying that "b" field is missing in each document) but then the "a" fields looks like it has the wrong data.
If we switch to just using AS for aliasing, this type of issue goes away and we would through an error for queries like select a b from default.