You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create.
If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:
Bug description
Environment
Spring-ai 1.0.0
Steps to reproduce @test
public void testEQ() {
// country == "BG"
Expression exp2 = this.parser.parse("biz_id == 3L");
assertThat(exp2).isEqualTo(new Expression(EQ, new Key("biz_id"), new Value(3L)));
}
Expected behavior
Support long type parsing
Minimal Complete Reproducible example @test
public void testEQ() {
// country == "BG"
Expression exp2 = this.parser.parse("biz_id == 3L");
assertThat(exp2).isEqualTo(new Expression(EQ, new Key("biz_id"), new Value(3L)));
}
Temporary solution
I am not familiar with antlr4, and the temporary solution is as follows:
org.springframework.ai.vectorstore.filter.FilterExpressionTextParser.FilterExpressionVisitor#visitIntegerConstantpublicFilter.OperandvisitIntegerConstant(FiltersParser.IntegerConstantContextctx) {
longvalue = Long.parseLong(ctx.getText());
if (value > Integer.MAX_VALUE || value < Integer.MIN_VALUE) {
returnnewFilter.Value(value);
}
returnnewFilter.Value((int)value);
}
The text was updated successfully, but these errors were encountered:
Hi @mucheng2035 thanks for the report, it's true that it doesn't have specific support for the Long type right now, I've submitted a PR to support it: #3516
Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create.
If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:
Bug description
Environment
Spring-ai 1.0.0
Steps to reproduce
@test
public void testEQ() {
// country == "BG"
Expression exp2 = this.parser.parse("biz_id == 3L");
assertThat(exp2).isEqualTo(new Expression(EQ, new Key("biz_id"), new Value(3L)));
Expected behavior
Support long type parsing
Minimal Complete Reproducible example
@test
public void testEQ() {
// country == "BG"
Temporary solution
I am not familiar with antlr4, and the temporary solution is as follows:
The text was updated successfully, but these errors were encountered: