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

zabetak 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 3dae2519f8 [CALCITE-5537] Slow test case failures in 
LatticeSuggesterTest
3dae2519f8 is described below

commit 3dae2519f8943d287688ddff8256d22f90ebaf67
Author: wangpeng <[email protected]>
AuthorDate: Thu Feb 23 10:33:47 2023 +0800

    [CALCITE-5537] Slow test case failures in LatticeSuggesterTest
    
    This was caused by [CALCITE-3870]. The SqlToRelConverter.Config.expand
    isn't set to true explicitly in LatticeSuggesterTest when the default
    value of SqlToRelConverter.Config.expand change from true to false.
    
    Close apache/calcite#3080
---
 .../org/apache/calcite/materialize/LatticeSuggesterTest.java  | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git 
a/core/src/test/java/org/apache/calcite/materialize/LatticeSuggesterTest.java 
b/core/src/test/java/org/apache/calcite/materialize/LatticeSuggesterTest.java
index 5ff1e95ac3..5d184330de 100644
--- 
a/core/src/test/java/org/apache/calcite/materialize/LatticeSuggesterTest.java
+++ 
b/core/src/test/java/org/apache/calcite/materialize/LatticeSuggesterTest.java
@@ -26,6 +26,7 @@ import org.apache.calcite.sql.fun.SqlLibrary;
 import org.apache.calcite.sql.fun.SqlLibraryOperatorTableFactory;
 import org.apache.calcite.sql.parser.SqlParseException;
 import org.apache.calcite.sql.parser.SqlParser;
+import org.apache.calcite.sql2rel.SqlToRelConverter;
 import org.apache.calcite.statistic.MapSqlStatisticProvider;
 import org.apache.calcite.statistic.QuerySqlStatisticProvider;
 import org.apache.calcite.test.CalciteAssert;
@@ -282,7 +283,9 @@ class LatticeSuggesterTest {
   }
 
   private void checkFoodMartAll(boolean evolve) throws Exception {
-    final Tester t = new Tester().foodmart().withEvolve(evolve);
+    final Tester t = new Tester().sqlToRelConverter(config -> 
config.withExpand(true))
+        .foodmart()
+        .withEvolve(evolve);
     final FoodMartQuerySet set = FoodMartQuerySet.instance();
     for (FoodMartQuerySet.FoodmartQuery query : set.queries.values()) {
       if (query.sql.contains("\"agg_10_foo_fact\"")
@@ -815,6 +818,12 @@ class LatticeSuggesterTest {
       return new Tester(config);
     }
 
+    Tester sqlToRelConverter(UnaryOperator<SqlToRelConverter.Config> 
sqlToRelConverterConfig) {
+      return withConfig(
+          builder().sqlToRelConverterConfig(sqlToRelConverterConfig
+              .apply(config.getSqlToRelConverterConfig())).build());
+    }
+
     Tester foodmart() {
       return schema(CalciteAssert.SchemaSpec.JDBC_FOODMART);
     }

Reply via email to