@Override
      protected List<Expression> visitIfExpression(IfExpression node, Scope context) {
        List<Expression> firstResult = process(node.getCondition(), context);
        List<Expression> secondResult = process(node.getTrueValue(), context);
        List<Expression> thirdResult =
            node.getFalseValue().isPresent() ? process(node.getFalseValue().get(), context) : null;
        if (expandedExpressions == null) {
          // no Columns need to be expanded
          return Collections.singletonList(node);
        }

        ImmutableList.Builder<Expression> resultBuilder = new ImmutableList.Builder<>();
        int firstSize = firstResult.size();
        int secondSize = secondResult.size();
        int thirdSize = thirdResult == null ? 0 : thirdResult.size();
        int maxSize = Math.max(thirdSize, Math.max(firstSize, secondSize));

        AtomicInteger baseIndex = new AtomicInteger(0);
        // if child is expanded, index of it reference the baseIndex, else the index of it always be
        // 0
        AtomicInteger firstIndex = (firstSize == maxSize) ? baseIndex : new AtomicInteger(0);
        AtomicInteger secondIndex = (secondSize == maxSize) ? baseIndex : new AtomicInteger(0);
        AtomicInteger thirdIndex = (thirdSize == maxSize) ? baseIndex : new AtomicInteger(0);
        for (int i = 0; i < maxSize; i++) {
          resultBuilder.add(
              new IfExpression(
                  firstResult.get(firstIndex.get()),
                  secondResult.get(secondIndex.get()),
                  thirdResult == null ? null : thirdResult.get(thirdIndex.get())));
          baseIndex.getAndIncrement();
        }

        return resultBuilder.build();
      }
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