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

xiong pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/main by this push:
     new c27cdb4d15 Enable more tests in RelBuilderExample
c27cdb4d15 is described below

commit c27cdb4d156e3d1d7614c1f46a728b3e4caa9392
Author: bowen.yang <[email protected]>
AuthorDate: Mon Aug 12 23:12:04 2024 +0800

    Enable more tests in RelBuilderExample
---
 .../org/apache/calcite/examples/RelBuilderExample.java | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git 
a/core/src/test/java/org/apache/calcite/examples/RelBuilderExample.java 
b/core/src/test/java/org/apache/calcite/examples/RelBuilderExample.java
index 5b4aa66339..b3c6a6675f 100644
--- a/core/src/test/java/org/apache/calcite/examples/RelBuilderExample.java
+++ b/core/src/test/java/org/apache/calcite/examples/RelBuilderExample.java
@@ -44,7 +44,7 @@ public class RelBuilderExample {
     // to the SCOTT database, with tables EMP and DEPT.
     final FrameworkConfig config = RelBuilderTest.config().build();
     final RelBuilder builder = RelBuilder.create(config);
-    for (int i = 0; i < 4; i++) {
+    for (int i = 0; i <= 4; i++) {
       doExample(builder, i);
       final RelNode node = builder.build();
       if (verbose) {
@@ -137,7 +137,7 @@ public class RelBuilderExample {
    *              /      \
    *         join          join
    *       /      \      /      \
-   * CUSTOMERS ORDERS LINE_ITEMS PRODUCTS
+   *     EMP     DEPT  EMP    BONUS
    * </pre></blockquote>
    *
    * <p>We build it in three stages. Store the intermediate results in 
variables
@@ -146,20 +146,20 @@ public class RelBuilderExample {
    */
   private RelBuilder example4(RelBuilder builder) {
     final RelNode left = builder
-        .scan("CUSTOMERS")
-        .scan("ORDERS")
-        .join(JoinRelType.INNER, "ORDER_ID")
+        .scan("EMP")
+        .scan("DEPT")
+        .join(JoinRelType.INNER, "DEPTNO")
         .build();
 
     final RelNode right = builder
-        .scan("LINE_ITEMS")
-        .scan("PRODUCTS")
-        .join(JoinRelType.INNER, "PRODUCT_ID")
+        .scan("EMP")
+        .scan("BONUS")
+        .join(JoinRelType.INNER, "ENAME")
         .build();
 
     return builder
         .push(left)
         .push(right)
-        .join(JoinRelType.INNER, "ORDER_ID");
+        .join(JoinRelType.INNER, "ENAME");
   }
 }

Reply via email to