From 11742ebdaf0490956940e28faeccf7b9a23de910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=B4=E7=AB=A0?= Date: Wed, 25 Jan 2023 10:53:41 +0800 Subject: [PATCH] make filter sql: right. --- .../rsqldb/parser/model/expression/RangeValueExpression.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rsqldb-parser/src/main/java/com/alibaba/rsqldb/parser/model/expression/RangeValueExpression.java b/rsqldb-parser/src/main/java/com/alibaba/rsqldb/parser/model/expression/RangeValueExpression.java index 0fe0b5b..06a5876 100644 --- a/rsqldb-parser/src/main/java/com/alibaba/rsqldb/parser/model/expression/RangeValueExpression.java +++ b/rsqldb-parser/src/main/java/com/alibaba/rsqldb/parser/model/expression/RangeValueExpression.java @@ -21,6 +21,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.node.NumericNode; @JsonIgnoreProperties(ignoreUnknown = true) public class RangeValueExpression extends SingleExpression { @@ -60,7 +61,7 @@ public Operator getOperator() { public boolean isTrue(JsonNode jsonNode) { String fieldName = this.getField().getFieldName(); JsonNode node = jsonNode.get(fieldName); - if (node == null) { + if (!(node instanceof NumericNode)) { return false; }