From 5dae3c64a3f9f4a72640e6a0e9e7413e4a7e97ce Mon Sep 17 00:00:00 2001 From: yehzu Date: Tue, 25 Feb 2020 20:43:26 +0800 Subject: fix incorrect comma between orderBy and limit/offset/timeout --- client/src/main/java/ai/vespa/client/dsl/EndQuery.java | 2 +- client/src/test/groovy/ai/vespa/client/dsl/QTest.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'client/src') diff --git a/client/src/main/java/ai/vespa/client/dsl/EndQuery.java b/client/src/main/java/ai/vespa/client/dsl/EndQuery.java index 4facf6ce0fb..2af1e0bb49d 100644 --- a/client/src/main/java/ai/vespa/client/dsl/EndQuery.java +++ b/client/src/main/java/ai/vespa/client/dsl/EndQuery.java @@ -177,7 +177,7 @@ public class EndQuery { } else if (others.isEmpty()) { sb.append("order by ").append(orderStr); } else { - sb.append("order by ").append(orderStr).append(", ").append(others); + sb.append("order by ").append(orderStr).append(" ").append(others); } if (groupQueryStr != null) { diff --git a/client/src/test/groovy/ai/vespa/client/dsl/QTest.groovy b/client/src/test/groovy/ai/vespa/client/dsl/QTest.groovy index e363a9bcc13..19c87d6aecd 100644 --- a/client/src/test/groovy/ai/vespa/client/dsl/QTest.groovy +++ b/client/src/test/groovy/ai/vespa/client/dsl/QTest.groovy @@ -59,7 +59,7 @@ class QTest extends Specification { .build() expect: - q == """yql=select * from sd1 where f1 contains "v1" and f2 contains "v2" or f3 contains "v3" and !(f4 contains "v4") order by f1 desc, f2 asc, limit 2 offset 1 timeout 3;¶mk1=paramv1""" + q == """yql=select * from sd1 where f1 contains "v1" and f2 contains "v2" or f3 contains "v3" and !(f4 contains "v4") order by f1 desc, f2 asc limit 2 offset 1 timeout 3;¶mk1=paramv1""" } def "matches"() { -- cgit v1.2.3