anchor.diff:  patternRecognition
       : aliasedRelation (
           MATCH_RECOGNIZE '('
  -                (PARTITION BY partition+=expression (',' partition+=expression)*)?
  -                (ORDER BY sortItem (',' sortItem)*)?
  -                (MEASURES measureDefinition (',' measureDefinition)*)?
  -                rowsPerMatch?
  -                (AFTER MATCH skipTo)?
  -                (INITIAL | SEEK)?
  -                PATTERN '(' rowPattern ')'
  -                (SUBSET subsetDefinition (',' subsetDefinition)*)?
  -                DEFINE variableDefinition (',' variableDefinition)*
  -            ')'
  -        (AS? identifier columnAliases?)?)?
  +          (PARTITION BY partition+=expression (',' partition+=expression)*)?
  +          (ORDER BY sortItem (',' sortItem)*)?
  +          (MEASURES measureDefinition (',' measureDefinition)*)?
  +          rowsPerMatch?
  +          (AFTER MATCH skipTo)?
  +          (INITIAL | SEEK)?
  +          PATTERN '(' rowPattern ')'
  +          (SUBSET subsetDefinition (',' subsetDefinition)*)?
  +          DEFINE variableDefinition (',' variableDefinition)*
  +        ')'
  +        (AS? identifier columnAliases?)?
  +      )?
       ;
   
   measureDefinition
  
positive.code:     | DROP TABLE (IF EXISTS)? qualifiedName                            #dropTable
      | INSERT INTO qualifiedName columnAliases? query                   #insertInto
      | DELETE FROM qualifiedName (WHERE booleanExpression)?             #delete
      | ALTER TABLE (IF EXISTS)? from=qualifiedName RENAME TO to=qualifiedName        #renameTable
      | COMMENT ON TABLE qualifiedName IS (string | NULL)                #commentTable
      | COMMENT ON COLUMN qualifiedName IS (string | NULL)               #commentColumn
      | ALTER TABLE (IF EXISTS)? tableName=qualifiedName
          RENAME COLUMN (IF EXISTS)? from=identifier TO to=identifier    #renameColumn
      | ALTER TABLE (IF EXISTS)? tableName=qualifiedName
          DROP COLUMN (IF EXISTS)? column=qualifiedName                  #dropColumn
      | ALTER TABLE (IF EXISTS)? tableName=qualifiedName
          ADD COLUMN (IF NOT EXISTS)? column=columnDefinition            #addColumn
      | ALTER TABLE tableName=qualifiedName SET AUTHORIZATION principal  #setTableAuthorization
      | ANALYZE qualifiedName (WITH properties)?                         #analyze
      | CREATE (OR REPLACE)?  MATERIALIZED VIEW
          (IF NOT EXISTS)?
          qualifiedName
          (COMMENT string)?
          (WITH properties)? AS query                                    #createMaterializedView
      | CREATE (OR REPLACE)? VIEW qualifiedName
  
negative.code:     : identifier EQ expression
      ;
  
  queryNoWith
      : queryTerm
        (ORDER BY sortItem (',' sortItem)*)?
        (OFFSET offset=rowCount (ROW | ROWS)?)?
        ( (LIMIT limit=limitRowCount)
        | (FETCH (FIRST | NEXT) (fetchFirst=rowCount)? (ROW | ROWS) (ONLY | WITH TIES))
        )?
      ;
  
  limitRowCount
      : ALL
  