isPivotKeyword returns true if the current token is the contextual PIVOT isQualifyKeyword returns true if the current token is the Snowflake / BigQuery QUALIFY clause keyword. QUALIFY tokenizes as an identifier, so detect by value and gate by dialect to avoid consuming a legitimate table alias named
()
| 80 | // detect by value and gate by dialect to avoid consuming a legitimate |
| 81 | // table alias named "qualify" in other dialects. |
| 82 | func (p *Parser) isQualifyKeyword() bool { |
| 83 | if p.dialect != string(keywords.DialectSnowflake) && |
| 84 | p.dialect != string(keywords.DialectBigQuery) { |
| 85 | return false |
| 86 | } |
| 87 | return strings.EqualFold(p.currentToken.Token.Value, "QUALIFY") |
| 88 | } |
| 89 | |
| 90 | // keyword in a dialect that supports it. PIVOT is non-reserved, so it may |
| 91 | // arrive as either an identifier or a keyword token. |
no outgoing calls
no test coverage detected