minio/pkg/s3select/sql
Ryan Tam bd56f80250 Fix ignored alias for aggregate result in S3 Select (#7849)
The SQL parser as it stands right now ignores alias for aggregate
result, e.g. `SELECT COUNT(*) AS thing FROM s3object` doesn't actually
return record like `{"thing": 42}`, it returns a record like `{"_1": 42}`.
Column alias for aggregate result is supported in AWS's S3 Select, so
this commit fixes that by respecting the `expr.As` in the expression.

Also improve test for S3 select

On top of testing a simple `SELECT` query, we want to test a few more
"advanced" queries (e.g. aggregation).

Convert existing tests into table driven tests[1], and add the new test
cases with "advanced" queries into them.

[1] - https://github.com/golang/go/wiki/TableDrivenTests
2019-07-03 16:34:54 -07:00
..
jsondata Add JSON Path expression evaluation support (#7315) 2019-03-09 08:13:37 -08:00
aggregation.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
analysis.go Fix s3select TRIM function's nil pointer dereference bug (#7817) 2019-06-24 16:59:33 -07:00
errors.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
evaluate.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
funceval.go Fix s3select TRIM function's nil pointer dereference bug (#7817) 2019-06-24 16:59:33 -07:00
jsonpath_test.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
jsonpath.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
parser_test.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
parser.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
record.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
statement.go Fix ignored alias for aggregate result in S3 Select (#7849) 2019-07-03 16:34:54 -07:00
stringfuncs_test.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
stringfuncs.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
timestampfuncs_test.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
timestampfuncs.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
utils.go Replace Minio refs in docs with MinIO and links (#7494) 2019-04-09 11:39:42 -07:00
value.go add timestamp compare support (#7832) 2019-06-25 11:05:37 -07:00