Skip to content

Commit 7eae3ea

Browse files
committed
Merge pull request #4 from bayesquant/master
correct Ge/Le/Gt/Lt opStr
2 parents 71b4df4 + f600964 commit 7eae3ea

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/scala/ast.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,24 +86,25 @@ case class Neq(lhs: SqlExpr, rhs: SqlExpr, ctx: Context = null) extends Equality
8686
def copyWithChildren(lhs: SqlExpr, rhs: SqlExpr) = copy(lhs = lhs, rhs = rhs, ctx = null)
8787
}
8888

89+
//wang Ge/Le/Gt/Lt
8990
trait InequalityLike extends Binop
9091
case class Ge(lhs: SqlExpr, rhs: SqlExpr, ctx: Context = null) extends InequalityLike {
91-
val opStr = "<="
92+
val opStr = ">="
9293
def copyWithContext(c: Context) = copy(ctx = c)
9394
def copyWithChildren(lhs: SqlExpr, rhs: SqlExpr) = copy(lhs = lhs, rhs = rhs, ctx = null)
9495
}
9596
case class Gt(lhs: SqlExpr, rhs: SqlExpr, ctx: Context = null) extends InequalityLike {
96-
val opStr = "<"
97+
val opStr = ">"
9798
def copyWithContext(c: Context) = copy(ctx = c)
9899
def copyWithChildren(lhs: SqlExpr, rhs: SqlExpr) = copy(lhs = lhs, rhs = rhs, ctx = null)
99100
}
100101
case class Le(lhs: SqlExpr, rhs: SqlExpr, ctx: Context = null) extends InequalityLike {
101-
val opStr = ">="
102+
val opStr = "<="
102103
def copyWithContext(c: Context) = copy(ctx = c)
103104
def copyWithChildren(lhs: SqlExpr, rhs: SqlExpr) = copy(lhs = lhs, rhs = rhs, ctx = null)
104105
}
105106
case class Lt(lhs: SqlExpr, rhs: SqlExpr, ctx: Context = null) extends InequalityLike {
106-
val opStr = ">"
107+
val opStr = "<"
107108
def copyWithContext(c: Context) = copy(ctx = c)
108109
def copyWithChildren(lhs: SqlExpr, rhs: SqlExpr) = copy(lhs = lhs, rhs = rhs, ctx = null)
109110
}

0 commit comments

Comments
 (0)