private List<Field> filterInaccessibleFields(List<Field> fields) {

      ImmutableSet.Builder<Field> accessibleFields = ImmutableSet.builder();

      // collect fields by table
      ListMultimap<QualifiedObjectName, Field> tableFieldsMap = ArrayListMultimap.create();
      fields.forEach(
          field -> {
            Optional<QualifiedObjectName> originTable = field.getOriginTable();
            if (originTable.isPresent()) {
              tableFieldsMap.put(originTable.get(), field);
            } else {
              // keep anonymous fields accessible
              accessibleFields.add(field);
            }
          });

      // TODO Auth control
      tableFieldsMap
          .asMap()
          .forEach(
              (table, tableFields) -> {
                //              Set<String> accessibleColumns = accessControl.filterColumns(
                //                      session.toSecurityContext(),
                //                      table.getCatalogName(),
                //                      ImmutableMap.of(
                //                          table.asSchemaTableName(),
                //                          tableFields.stream()
                //                              .map(field -> field.getOriginColumnName().get())
                //                              .collect(toImmutableSet())))
                //                  .getOrDefault(table.asSchemaTableName(), ImmutableSet.of());
                accessibleFields.addAll(
                    tableFields.stream()
                        // .filter(field ->
                        // accessibleColumns.contains(field.getOriginColumnName().get()))
                        .collect(toImmutableList()));
              });

      return fields.stream().filter(accessibleFields.build()::contains).collect(toImmutableList());
    }
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