Skip to content

Commit

Permalink
Merge pull request #22668 from RaduBerinde/tag-const
Browse files Browse the repository at this point in the history
opt: tag constant values
  • Loading branch information
RaduBerinde authored Feb 13, 2018
2 parents c02d506 + 7409b27 commit 61ac7fe
Show file tree
Hide file tree
Showing 3 changed files with 96 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/sql/opt/ops/scalar.opt
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ define Variable {

# Const is a typed scalar constant value. The private field is a tree.Datum
# value having any datum type that's legal in the expression's context.
[Scalar]
[Scalar, ConstValue]
define Const {
Value Datum
}

# True is the boolean true value that is equivalent to the tree.DBoolTrue datum
# value. It is a separate operator to make matching and replacement simpler and
# more efficient, as patterns can contain (True) expressions.
[Scalar, Boolean]
[Scalar, Boolean, ConstValue]
define True {
}

# False is the boolean false value that is equivalent to the tree.DBoolFalse
# datum value. It is a separate operator to make matching and replacement
# simpler and more efficient, as patterns can contain (False) expressions.
[Scalar, Boolean]
[Scalar, Boolean, ConstValue]
define False {
}

Expand Down
6 changes: 6 additions & 0 deletions pkg/sql/opt/opt/operator.og.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 87 additions & 0 deletions pkg/sql/opt/xform/expr.og.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 61ac7fe

Please sign in to comment.