parseTryCastExpression parses a TRY_CAST expression with the same shape as CAST. Snowflake, SQL Server, and BigQuery return NULL on conversion failure instead of raising an error.
()
| 141 | // CAST. Snowflake, SQL Server, and BigQuery return NULL on conversion failure |
| 142 | // instead of raising an error. |
| 143 | func (p *Parser) parseTryCastExpression() (*ast.CastExpression, error) { |
| 144 | return p.parseCastLike(true) |
| 145 | } |
| 146 | |
| 147 | // parseCastLike implements the body shared between CAST and TRY_CAST. The |
| 148 | // caller is responsible for ensuring the current token is the leading keyword. |
no test coverage detected