Skip to content

Commit

Permalink
Fixed runtime compilation error.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxin committed Jun 11, 2015
1 parent 911c450 commit 9a48e8d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,8 @@ abstract class BinaryComparison extends BinaryExpression with Predicate {

override def genCode(ctx: CodeGenContext, ev: GeneratedExpressionCode): String = {
left.dataType match {
case dt: NumericType if ctx.isNativeType(dt) => defineCodeGen (ctx, ev, {
(c1, c3) => s"$c1 $symbol $c3"
})
case StringType =>
defineCodeGen (ctx, ev, (c1, c2) => s"$c1.compareTo($c2) $symbol 0")
case dt: NumericType if ctx.isNativeType(dt) =>
defineCodeGen (ctx, ev, (c1, c3) => s"$c1 $symbol $c3")
case DateType | TimestampType =>
defineCodeGen (ctx, ev, (c1, c3) => s"$c1 $symbol $c3")
case _ =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ public int compareTo(final UTF8String other) {
return bytes.length - b.length;
}

public int compare(final UTF8String other) {
return compareTo(other);
}

@Override
public boolean equals(final Object other) {
if (other instanceof UTF8String) {
Expand Down

0 comments on commit 9a48e8d

Please sign in to comment.