@Override
  public Statement visitAlterLogicalView(IoTDBSqlParser.AlterLogicalViewContext ctx) {
    if (ctx.alterClause() == null) {
      final AlterLogicalViewStatement alterLogicalViewStatement = new AlterLogicalViewStatement();
      // parse target
      parseViewTargetPaths(
          ctx.viewTargetPaths(),
          alterLogicalViewStatement::setTargetFullPaths,
          alterLogicalViewStatement::setTargetPathsGroup,
          intoItem -> {
            if (intoItem != null) {
              throw new SemanticException(
                  "Can not use char '$' or into item in alter view statement.");
            }
          });
      // parse source
      parseViewSourcePaths(
          ctx.viewSourcePaths(),
          alterLogicalViewStatement::setSourceFullPaths,
          alterLogicalViewStatement::setSourcePathsGroup,
          alterLogicalViewStatement::setSourceQueryStatement);

      return alterLogicalViewStatement;
    } else {
      final AlterTimeSeriesStatement alterTimeSeriesStatement = new AlterTimeSeriesStatement(true);
      alterTimeSeriesStatement.setPath(parseFullPath(ctx.fullPath()));
      parseAlterClause(ctx.alterClause(), alterTimeSeriesStatement);
      if (alterTimeSeriesStatement.getAlias() != null) {
        throw new SemanticException("View doesn't support alias.");
      }
      return alterTimeSeriesStatement;
    }
  }
Check and set datatype, encoding, compressor.

@throws SemanticException if encoding or dataType meets error handling
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/parser/ASTVisitor.java