protected void setSqlKind(SqlKind sqlKind) {
    // when e.g. a MERGE query is rewritten to INSERTs, the analyzer codepaths
    // will keep calling setSqlKind(HiveOperation.INSERT), so this null-check prevents overwrite
    if (queryState.getSqlKind() == null) {
      queryState.setSqlKind(sqlKind);
    }
  }
Sets the sqlKind of the query if any. Subclasses can overwrite this to prevent using any sqlKind (e.g. MV REBUILD).
@param sqlKind that belongs to the semantic analyzer
ql/src/java/org/apache/hadoop/hive/ql/parse/BaseSemanticAnalyzer.java