mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
fix: s3 sql parse error for colums as with quotes (#18765)
This commit is contained in:
@@ -383,3 +383,13 @@ func TestSqlLexerArithOps(t *testing.T) {
|
||||
// fmt.Printf("%d: %#v\n", i, t)
|
||||
// }
|
||||
}
|
||||
|
||||
func TestParseSelectStatement(t *testing.T) {
|
||||
exp, err := ParseSelectStatement("select _3,_1,_2 as 'mytest' from S3object")
|
||||
if err != nil {
|
||||
t.Fatalf("parse alias sql error: %v", err)
|
||||
}
|
||||
if exp.selectAST.Expression.Expressions[2].As != "mytest" {
|
||||
t.Fatalf("parse alias sql error: %s not equal %s", exp.selectAST.Expression.Expressions[2].As, err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user