@Override
    protected Scope visitTable(Table table, Optional<Scope> scope) {
      if (!table.getName().getPrefix().isPresent()) {
        // is this a reference to a WITH query?
        Optional<WithQuery> withQuery =
            createScope(scope).getNamedQuery(table.getName().getSuffix());
        if (withQuery.isPresent()) {
          analysis.setRelationName(table, table.getName());
          return createScopeForCommonTableExpression(table, scope, withQuery.get());
        }
        // is this a recursive reference in expandable WITH query? If so, there's base scope
        // recorded.
        Optional<Scope> expandableBaseScope = analysis.getExpandableBaseScope(table);
        if (expandableBaseScope.isPresent()) {
          Scope baseScope = expandableBaseScope.get();
          // adjust local and outer parent scopes accordingly to the local context of the recursive
          // reference
          Scope resultScope =
              scopeBuilder(scope)
                  .withRelationType(baseScope.getRelationId(), baseScope.getRelationType())
                  .build();
          analysis.setScope(table, resultScope);
          analysis.setRelationName(table, table.getName());
          return resultScope;
        }
      }

      QualifiedObjectName name = createQualifiedObjectName(sessionContext, table.getName());

      // access control
      accessControl.checkCanSelectFromTable(sessionContext.getUserName(), name);

      analysis.setRelationName(
          table, QualifiedName.of(name.getDatabaseName(), name.getObjectName()));

      Optional<TableSchema> tableSchema = metadata.getTableSchema(sessionContext, name);
      // This can only be a table
      if (!tableSchema.isPresent()) {
        TableMetadataImpl.throwTableNotExistsException(
            name.getDatabaseName(), name.getObjectName());
      }
      analysis.addEmptyColumnReferencesForTable(accessControl, sessionContext.getIdentity(), name);

      ImmutableList.Builder<Field> fields = ImmutableList.builder();
      fields.addAll(analyzeTableOutputFields(table, name, tableSchema.get()));

      List<Field> outputFields = fields.build();

      RelationType relationType = new RelationType(outputFields);
      analysis.registerTable(table, tableSchema, name);

      return createAndAssignScope(table, scope, relationType);
    }
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