mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 04:30:26 +03:00
Add new SQL parser to support S3 Select syntax (#7102)
- New parser written from scratch, allows easier and complete parsing of the full S3 Select SQL syntax. Parser definition is directly provided by the AST defined for the SQL grammar. - Bring support to parse and interpret SQL involving JSON path expressions; evaluation of JSON path expressions will be subsequently added. - Bring automatic type inference and conversion for untyped values (e.g. CSV data).
This commit is contained in:
committed by
Harshavardhana
parent
0a28c28a8c
commit
2786055df4
+19
@@ -0,0 +1,19 @@
|
||||
package participle
|
||||
|
||||
import (
|
||||
"github.com/alecthomas/participle/lexer"
|
||||
)
|
||||
|
||||
// Capture can be implemented by fields in order to transform captured tokens into field values.
|
||||
type Capture interface {
|
||||
Capture(values []string) error
|
||||
}
|
||||
|
||||
// The Parseable interface can be implemented by any element in the grammar to provide custom parsing.
|
||||
type Parseable interface {
|
||||
// Parse into the receiver.
|
||||
//
|
||||
// Should return NextMatch if no tokens matched and parsing should continue.
|
||||
// Nil should be returned if parsing was successful.
|
||||
Parse(lex lexer.PeekingLexer) error
|
||||
}
|
||||
Reference in New Issue
Block a user