Skip to content

Commit

Permalink
Fix bq try_cast(xxx as xx format 'xxx').
Browse files Browse the repository at this point in the history
  • Loading branch information
lingo-xp authored and wenshao committed Dec 5, 2024
1 parent ed630ea commit df49be1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ protected SQLExpr methodRest(SQLExpr expr, boolean acceptLPAREN) {
castExpr.setDataType(
parseDataType()
);
castExpr = parseCastFormat(castExpr);
accept(Token.RPAREN);
return castExpr;
}
Expand Down
4 changes: 4 additions & 0 deletions core/src/test/resources/bvt/parser/bigquery/0.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
SELECT SAFE_CAST(var_start_date AS STRING FORMAT 'DD')
--------------------
SELECT SAFE_CAST(var_start_date AS STRING FORMAT 'DD')
------------------------------------------------------------------------------------------------------------------------
select 1,2,
union all
select 2, 3
Expand Down

0 comments on commit df49be1

Please sign in to comment.