private void getNewTimeValueExpressions(
      LogicalExpression node,
      List<Pair<Expression, Boolean>> resultPairs,
      List<Expression> newTimeFilterTerms,
      List<Expression> newValueFilterTerms) {
    for (int i = 0; i < resultPairs.size(); i++) {
      Pair<Expression, Boolean> pair = resultPairs.get(i);

      if (pair.left != null) {
        newTimeFilterTerms.add(pair.left);

        // has time filter, also has value filter
        if (pair.right) {
          newValueFilterTerms.add(node.getTerms().get(i));
        }
      } else {
        // only has value filter
        newValueFilterTerms.add(node.getTerms().get(i));
      }
    }
  }
Extract global time predicate from query predicate.

@param predicate raw query predicate
@return Pair, left is globalTimePredicate, right is if hasValueFilter.
@throws UnknownExpressionTypeException unknown expression type
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/GlobalTimePredicateExtractVisitor.java