不支持localdate类型比对
- Dominant language
- Java
- Stars
- 5.6k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
@Test
public void localDateTest() throws Exception {
ExpressRunner runner = new ExpressRunner(true, false);
runner.setShortCircuit(true);
runner.setIgnoreConstChar(true);
DefaultContext context = new DefaultContext();
LocalDate date1 = LocalDate.now();
LocalDate date2 = LocalDate.now();
context.put("date1", date1);
context.put("date2", date2);
Object execute = runner.execute("date1 > date2", context, null, false, false);
System.out.println(execute);
}
Caused by: com.ql.util.express.exception.QLException: 2024-08-26和2024-08-26不能执行compare 操作
at com.ql.util.express.Operator.compareData(Operator.java:120)
at com.ql.util.express.instruction.op.OperatorEqualsLessMore.executeInner(OperatorEqualsLessMore.java:46)
at com.ql.util.express.instruction.op.OperatorEqualsLessMore.executeInner(OperatorEqualsLessMore.java:28)
at com.ql.util.express.instruction.op.OperatorEqualsLessMore.executeInner(OperatorEqualsLessMore.java:24)
at com.ql.util.express.Operator.executeInner(Operator.java:26)
at com.ql.util.express.instruction.op.OperatorBase.execute(OperatorBase.java:56)
at com.ql.util.express.instruction.detail.InstructionOperator.execute(InstructionOperator.java:32)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the localDateTest reproduction in the issue and inspect Operator.java at compareData, followed by OperatorEqualsLessMore.java. Run the test to confirm the current comparison failure, then add regression coverage showing that comparing two LocalDate values completes without the reported QLException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100