Skip to content

Commit

Permalink
AST Conversion PR Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Hydrocharged committed Nov 14, 2023
1 parent 4eda5d4 commit 34e701f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions server/ast/expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func nodeExpr(node tree.Expr) (vitess.Expr, error) {
Else: else_,
}, nil
case *tree.CastExpr:
//TODO: this should probably be a ConvertExpr
//TODO: finish the implementation
return &vitess.ConvertExpr{
Name: "",
Expr: nil,
Expand Down Expand Up @@ -377,7 +377,7 @@ func nodeExpr(node tree.Expr) (vitess.Expr, error) {
}, nil
case *tree.NullIfExpr:
//TODO: probably should be the IF function: IF(Expr1 == Expr2, NULL, Expr1)
return nil, fmt.Errorf("IFERROR is not yet supported")
return nil, fmt.Errorf("NULLIF is not yet supported")
case *tree.NumVal:
switch node.Kind() {
case constant.Int:
Expand Down Expand Up @@ -409,12 +409,12 @@ func nodeExpr(node tree.Expr) (vitess.Expr, error) {
Expr: expr,
}, nil
case *tree.PartitionMaxVal:
return nil, fmt.Errorf("MAX is not yet supported")
return nil, fmt.Errorf("MAXVALUE is not yet supported")
case *tree.PartitionMinVal:
return nil, fmt.Errorf("MIN is not yet supported")
return nil, fmt.Errorf("MINVALUE is not yet supported")
case *tree.Placeholder:
//TODO: figure out if I can delete this
return nil, fmt.Errorf("this should probably be deleted (internal error, Placeholder)")
panic("this should probably be deleted (internal error, Placeholder)")
case *tree.RangeCond:
operator := vitess.BetweenStr
if node.Not {
Expand Down

0 comments on commit 34e701f

Please sign in to comment.