[x] Validates the query depending upon the passed --project columns, --groupby columns and aggregate predicates
[x] Validate the passed --project columns and build return schema in case of aggregate predicates
The validation is important to achieve as, if an aggregate function is used in the query, then the projected columns must be either being aggregated over or being performed a GROUP BY clause on.
To see this in action, please take a look here, wherein different queries have been demonstrated along with success and error messages.
This PR:
--groupby
flag to be passed--orderby
flag to be passed--project
columns,--groupby
columns and aggregate predicates--project
columns and build return schema in case of aggregate predicatesThe validation is important to achieve as, if an aggregate function is used in the query, then the projected columns must be either being aggregated over or being performed a GROUP BY clause on.
To see this in action, please take a look here, wherein different queries have been demonstrated along with success and error messages.