Snowflake IFF and CURRENT_TIMESTAMP(n) support
Hi. I have been testing parser with snowflake sql and have found couple of sqls not possible to parse. Would it be possible to support these cases?
IFF statement: Single-level if-then-else expression. Similar to CASE, but only allows a single condition. https://docs.snowflake.net/manuals/sql-reference/functions/iff.html
CURRENT_TIMESTAMP with <fract_sec_precision> parameter https://docs.snowflake.net/manuals/sql-reference/functions/current_timestamp.html
Actual Behavior
Parsing exception.
Expected Behavior
Parsing should success.
Steps to Reproduce the Problem
- select current_timestamp(3);
- select iff(1 > 0, 'true', 'false');
Specifications
- Version: 1.2
Could possibly be done, if you feel like tackling this yourself you can start by looking at this: https://github.com/JSQLParser/JSqlParser/blob/master/src/main/jjtree/net/sf/jsqlparser/parser/JSqlParserCC.jjt#L136
I've done this before in #405
no answer