From 5249bd3d73bdf25adc42b8434e98509194a86056 Mon Sep 17 00:00:00 2001 From: nobigo Date: Fri, 24 Jan 2025 10:39:53 +0800 Subject: [PATCH] Enable tests in unnest.iq about [CALCITE-5127] --- .../calcite/rel/metadata/RelMdPredicates.java | 2 +- core/src/test/resources/sql/unnest.iq | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdPredicates.java b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdPredicates.java index f162f27e832..f7d7692c101 100644 --- a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdPredicates.java +++ b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdPredicates.java @@ -114,7 +114,7 @@ * select a from R1 where a > 7 * → "a > 7" is pulled up from the Projection. * select a + 1 from R1 where a + 1 > 7 - * → "a + 1 gt; 7" is not pulled up + * → "a + 1 > 7" is not pulled up * * *
  • There are several restrictions on Joins: diff --git a/core/src/test/resources/sql/unnest.iq b/core/src/test/resources/sql/unnest.iq index bf990ad4634..88488141ad3 100644 --- a/core/src/test/resources/sql/unnest.iq +++ b/core/src/test/resources/sql/unnest.iq @@ -116,19 +116,16 @@ from UNNEST(array(select 'banana')) as fruit; !ok -#TODO: Remove if when [CALCITE-5127] will be fixed. -!if (false) { SELECT ARRAY(SELECT y + 1 FROM UNNEST(s.x) y) FROM (SELECT ARRAY[1,2,3] as x) s; -+--------+ -| FRUIT | -+--------+ -| banana | -+--------+ ++-----------+ +| EXPR$0 | ++-----------+ +| [2, 3, 4] | ++-----------+ (1 row) !ok -!} # If UNNEST is not the direct child of the AS, aliasing doesn't happen. SELECT fruit.*