Skip to content

Commit

Permalink
improved big query sql parser
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Nov 7, 2024
1 parent d0ed388 commit 3e8e6c1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions core/src/main/java/com/alibaba/druid/sql/ast/expr/SQLCharExpr.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ public List<SQLObject> getChildren() {
return Collections.emptyList();
}

public SQLDateExpr toDate() {
return new SQLDateExpr(this.text);
}

public SQLDateTimeExpr toDateTime() {
return new SQLDateTimeExpr(this.text);
}

public SQLTimestampExpr toTimestamp() {
return new SQLTimestampExpr(this.text);
}

@Override
public int compareTo(SQLCharExpr o) {
return this.text.compareTo(o.text);
Expand Down

0 comments on commit 3e8e6c1

Please sign in to comment.