parseCastExpression parses a CAST expression: CAST(expr AS type) Examples: CAST(id AS VARCHAR) CAST(price AS DECIMAL(10,2)) CAST(name AS VARCHAR(100))
()
| 134 | // CAST(price AS DECIMAL(10,2)) |
| 135 | // CAST(name AS VARCHAR(100)) |
| 136 | func (p *Parser) parseCastExpression() (*ast.CastExpression, error) { |
| 137 | return p.parseCastLike(false) |
| 138 | } |
| 139 | |
| 140 | // parseTryCastExpression parses a TRY_CAST expression with the same shape as |
| 141 | // CAST. Snowflake, SQL Server, and BigQuery return NULL on conversion failure |
no test coverage detected