diff options
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/yql/ProgramParser.java')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/yql/ProgramParser.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/yql/ProgramParser.java b/container-search/src/main/java/com/yahoo/search/yql/ProgramParser.java index fc0cef2fb5e..5258087eb44 100644 --- a/container-search/src/main/java/com/yahoo/search/yql/ProgramParser.java +++ b/container-search/src/main/java/com/yahoo/search/yql/ProgramParser.java @@ -914,7 +914,13 @@ final class ProgramParser { String text = literal.getChild(0).getText(); switch(parseTreeIndex) { case yqlplusParser.INT: - return Integer.valueOf(text); + Long as_long = Long.valueOf(text); + int as_int = as_long.intValue(); + if (as_int == as_long) { + return Integer.valueOf(as_int); + } else { + return as_long; + } case yqlplusParser.FLOAT: return Double.valueOf(text); case yqlplusParser.STRING: |