summaryrefslogtreecommitdiffstats
path: root/model-integration
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2019-06-12 18:49:11 +0200
committerGitHub <noreply@github.com>2019-06-12 18:49:11 +0200
commitcee1c3a3804d5d3c25407b3c4ac64228e9d194e3 (patch)
treedd62faee06cd29d5820f9bc33a488be55a6ceef8 /model-integration
parent5311e389929c05707856697e73db61b6acee3c5a (diff)
Require constant() for large constants and fix a type resolving bug (#9769)
* Require constant() for large constants and fix a type resolving bug * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise * Remove noise
Diffstat (limited to 'model-integration')
-rw-r--r--model-integration/src/test/java/ai/vespa/rankingexpression/importer/vespa/VespaImportTestCase.java2
-rw-r--r--model-integration/src/test/models/vespa/example.model2
2 files changed, 2 insertions, 2 deletions
diff --git a/model-integration/src/test/java/ai/vespa/rankingexpression/importer/vespa/VespaImportTestCase.java b/model-integration/src/test/java/ai/vespa/rankingexpression/importer/vespa/VespaImportTestCase.java
index 25a24792432..c7210e6710a 100644
--- a/model-integration/src/test/java/ai/vespa/rankingexpression/importer/vespa/VespaImportTestCase.java
+++ b/model-integration/src/test/java/ai/vespa/rankingexpression/importer/vespa/VespaImportTestCase.java
@@ -40,7 +40,7 @@ public class VespaImportTestCase {
assertEquals(2, model.expressions().size());
assertEquals("reduce(reduce(input1 * input2, sum, name) * constant1, max, x) * constant2",
model.expressions().get("foo1").getRoot().toString());
- assertEquals("reduce(reduce(input1 * input2, sum, name) * constant1asLarge, max, x) * constant2",
+ assertEquals("reduce(reduce(input1 * input2, sum, name) * constant(constant1asLarge), max, x) * constant2",
model.expressions().get("foo2").getRoot().toString());
List<ImportedMlFunction> functions = model.outputExpressions();
diff --git a/model-integration/src/test/models/vespa/example.model b/model-integration/src/test/models/vespa/example.model
index 6d660732db9..269ed83b695 100644
--- a/model-integration/src/test/models/vespa/example.model
+++ b/model-integration/src/test/models/vespa/example.model
@@ -19,7 +19,7 @@ model example {
}
function foo2() {
- expression: reduce(sum(input1 * input2, name) * constant1asLarge, max, x) * constant2
+ expression: reduce(sum(input1 * input2, name) * constant(constant1asLarge), max, x) * constant2
}
} \ No newline at end of file