@Override
  public Statement visitCountDevices(CountDevicesContext ctx) {
    PartialPath path;
    if (ctx.prefixPath() != null) {
      path = parsePrefixPath(ctx.prefixPath());
    } else {
      path = new PartialPath(SqlConstant.getSingleRootArray());
    }
    CountDevicesStatement statement = new CountDevicesStatement(path);
    if (ctx.timeConditionClause() != null) {
      WhereCondition timeCondition = parseWhereClause(ctx.timeConditionClause().whereClause());
      statement.setTimeCondition(timeCondition);
    }
    return statement;
  }
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