canBeAlias checks if current token can be used as an alias. Aliases can be IDENT, double-quoted identifiers, or certain non-reserved keywords, but NOT contextual clause keywords that would be consumed as aliases by mistake (e.g. MINUS in Snowflake/Oracle, QUALIFY in Snowflake/BigQuery).
()
| 1085 | // but NOT contextual clause keywords that would be consumed as aliases by mistake |
| 1086 | // (e.g. MINUS in Snowflake/Oracle, QUALIFY in Snowflake/BigQuery). |
| 1087 | func (p *Parser) canBeAlias() bool { |
| 1088 | if p.isMinusSetOp() || p.isQualifyKeyword() { |
| 1089 | return false |
| 1090 | } |
| 1091 | return p.isIdentifier() || p.isNonReservedKeyword() |
| 1092 | } |
| 1093 | |
| 1094 | // parseAlterTableStmt is a simplified version for the parser implementation |
| 1095 | // It delegates to the more comprehensive parseAlterStatement in alter.go |
no test coverage detected