Thread safe statements (#406)

Previously, expressions and params were evaluated
during the planning phase. This change builds the query
plan without evaluating params and expressions
which are then evaluated only during the execution phase.
This commit is contained in:
Asdine El Hrychy
2021-06-04 10:56:23 +04:00
committed by GitHub
parent 7a98a2025f
commit 9918cd6f55
42 changed files with 946 additions and 795 deletions

View File

@@ -10,7 +10,7 @@ import (
// parseInsertStatement parses an insert string and returns a Statement AST object.
// This function assumes the INSERT token has already been consumed.
func (p *Parser) parseInsertStatement() (*statement.InsertStmt, error) {
func (p *Parser) parseInsertStatement() (*statement.StreamStmt, error) {
var stmt statement.InsertStmt
var err error
@@ -62,7 +62,7 @@ func (p *Parser) parseInsertStatement() (*statement.InsertStmt, error) {
return nil, err
}
return &stmt, nil
return stmt.ToStream()
}
// parseFieldList parses a list of fields in the form: (path, path, ...), if exists.