private void analyzeSelectAllColumns(
        AllColumns allColumns,
        QuerySpecification node,
        Scope scope,
        ImmutableList.Builder<Expression> outputExpressionBuilder,
        ImmutableList.Builder<Analysis.SelectExpression> selectExpressionBuilder) {
      // expand * and expression.*
      if (allColumns.getTarget().isPresent()) {
        // analyze AllColumns with target expression (expression.*)
        Expression expression = allColumns.getTarget().get();

        QualifiedName prefix = asQualifiedName(expression);
        if (prefix != null) {
          // analyze prefix as an 'asterisked identifier chain'
          Scope.AsteriskedIdentifierChainBasis identifierChainBasis =
              scope
                  .resolveAsteriskedIdentifierChainBasis(prefix, allColumns)
                  .orElseThrow(
                      () ->
                          new SemanticException(
                              String.format("Unable to resolve reference %s", prefix)));
          if (identifierChainBasis.getBasisType() == TABLE) {
            RelationType relationType =
                identifierChainBasis
                    .getRelationType()
                    .orElseThrow(() -> new NoSuchElementException("No value present"));
            List<Field> requestedFields =
                relationType.resolveVisibleFieldsWithRelationPrefix(Optional.of(prefix));
            List<Field> fields = filterInaccessibleFields(requestedFields);
            if (fields.isEmpty()) {
              if (!requestedFields.isEmpty()) {
                throw new SemanticException("Relation not found or not allowed");
              }
              throw new SemanticException("SELECT * not allowed from relation that has no columns");
            }
            boolean local =
                scope.isLocalScope(
                    identifierChainBasis
                        .getScope()
                        .orElseThrow(() -> new NoSuchElementException("No value present")));
            analyzeAllColumnsFromTable(
                fields,
                allColumns,
                node,
                local ? scope : identifierChainBasis.getScope().get(),
                outputExpressionBuilder,
                selectExpressionBuilder,
                relationType,
                local);
            return;
          }
        }
        // identifierChainBasis.get().getBasisType == FIELD or target expression isn't a
        // QualifiedName
        throw new SemanticException(
            "identifierChainBasis.get().getBasisType == FIELD or target expression isn't a QualifiedName");
        //        analyzeAllFieldsFromRowTypeExpression(expression, allColumns, node, scope,
        // outputExpressionBuilder,
        //            selectExpressionBuilder);
      } else {
        // analyze AllColumns without target expression ('*')
        if (!allColumns.getAliases().isEmpty()) {
          throw new SemanticException("Column aliases not supported");
        }

        List<Field> requestedFields = (List<Field>) scope.getRelationType().getVisibleFields();
        List<Field> fields = filterInaccessibleFields(requestedFields);
        if (fields.isEmpty()) {
          if (!node.getFrom().isPresent()) {
            throw new SemanticException("SELECT * not allowed in queries without FROM clause");
          }
          if (!requestedFields.isEmpty()) {
            throw new SemanticException("Relation not found or not allowed");
          }
          throw new SemanticException("SELECT * not allowed from relation that has no columns");
        }

        analyzeAllColumnsFromTable(
            fields,
            allColumns,
            node,
            scope,
            outputExpressionBuilder,
            selectExpressionBuilder,
            scope.getRelationType(),
            true);
      }
    }
Check if there is Columns function in expression, and verify they are same if there are multi
Column functions.

@param expression input expression
@return if there is Columns function in expression
@throws SemanticException if there are multi Columns functions but different
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/analyzer/StatementAnalyzer.java