private static boolean checkBetweenConstantSatisfy(Expression e1, Expression e2) {
    return e1 instanceof LongLiteral
        && e2 instanceof LongLiteral
        && ((LongLiteral) e1).getParsedValue() <= ((LongLiteral) e2).getParsedValue();
  }
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