You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/12/06 00:08:11 UTC

[groovy] branch master updated: Tweak doco

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 7960714  Tweak doco
7960714 is described below

commit 796071486826c529f6fb5b41bfcb6df3b58371fb
Author: Daniel Sun <su...@apache.org>
AuthorDate: Sun Dec 6 08:06:20 2020 +0800

    Tweak doco
---
 subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc               | 2 +-
 .../groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy   | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc b/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc
index 4e1440c..2f68b53 100644
--- a/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc
+++ b/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc
@@ -392,7 +392,7 @@ include::../test/org/apache/groovy/ginq/GinqTest.groovy[tags=ginq_customize_01,i
 
 ==== Optimize GINQ
 
-GINQ optimizer is enabled by default for better performance. It will change the GINQ AST to achieve better execution plan.
+GINQ optimizer is enabled by default for better performance. It will transform the GINQ AST to achieve better execution plan.
 We could disable it by hand:
 [source, groovy]
 ----
diff --git a/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy b/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
index 2ab140b..081a0a9 100644
--- a/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
+++ b/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy
@@ -3509,9 +3509,10 @@ class GinqTest {
     void "testGinq - optimize - 3"() {
         assertScript '''
 // tag::ginq_optimize_01[]
-            assert [[1, 1], [2, 2], [3, 3]] == GQ(optimize:false) {
+            assert [[2, 2]] == GQ(optimize:false) {
                 from n1 in [1, 2, 3]
                 innerjoin n2 in [1, 2, 3] on n1 == n2
+                where n1 > 1 &&  n2 < 3
                 select n1, n2
             }.toList()
 // end::ginq_optimize_01[]