private static boolean constantExpressionEvaluatesSuccessfully(
      PlannerContext plannerContext, SessionInfo session, Expression constantExpression) {
    Map<NodeRef<Expression>, Type> types =
        new IrTypeAnalyzer(plannerContext)
            .getTypes(session, TypeProvider.empty(), constantExpression);
    IrExpressionInterpreter interpreter =
        new IrExpressionInterpreter(constantExpression, plannerContext, session, types);
    Object literalValue = interpreter.optimize(NoOpSymbolResolver.INSTANCE);
    return !(literalValue instanceof Expression);
  }
Returns whether expression is effectively literal. An effectively literal expression is a
simple constant value, or null, in either {@link Literal} form, or other form returned by
LiteralEncoder. In particular, other constant expressions like a deterministic function call
with constant arguments are not considered effectively literal.
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/ir/IrUtils.java