From e6261fe2a0e70c39ed19e803820342cb0ce6ada0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 14 Nov 2025 05:22:37 +0000 Subject: [PATCH] Fix UT failure and Linkchecker failure (#4809) (cherry picked from commit 3ca040c3d67b69c47dc52149af5de96a63fa6b77) Signed-off-by: github-actions[bot] --- docs/dev/intro-v3-architecture.md | 2 +- .../sql/ppl/calcite/CalcitePPLArrayFunctionTest.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/dev/intro-v3-architecture.md b/docs/dev/intro-v3-architecture.md index 16324caba39..fc5bf3237d1 100644 --- a/docs/dev/intro-v3-architecture.md +++ b/docs/dev/intro-v3-architecture.md @@ -98,7 +98,7 @@ In Linkedin, they created a internal Calcite repo to convert Pig Latin scripts i - Have an optimizer rule to optimize Pig group/cogroup into Aggregate operators - Implement other RelNode in Rel2Sql so that Pig Latin can be translated into SQL -This [work](https://issues.apache.org/jira/browse/CALCITE-3122) had contributed to Apache Calcite and named [Piglet](https://calcite.apache.org/javadocAggregate/org/apache/calcite/piglet/package-summary.html). It allows users to write queries in Pig Latin, and execute them using any applicable Calcite adapter. +This work had contributed to Apache Calcite \(CALCITE-3122\) and named [Piglet](https://calcite.apache.org/javadocAggregate/org/apache/calcite/piglet/package-summary.html). It allows users to write queries in Pig Latin, and execute them using any applicable Calcite adapter. Pig Latin leverage `RelBuilder` to implement as a third-part front-end language (dialect). diff --git a/ppl/src/test/java/org/opensearch/sql/ppl/calcite/CalcitePPLArrayFunctionTest.java b/ppl/src/test/java/org/opensearch/sql/ppl/calcite/CalcitePPLArrayFunctionTest.java index 4dec305d28c..bffa20175d5 100644 --- a/ppl/src/test/java/org/opensearch/sql/ppl/calcite/CalcitePPLArrayFunctionTest.java +++ b/ppl/src/test/java/org/opensearch/sql/ppl/calcite/CalcitePPLArrayFunctionTest.java @@ -127,7 +127,7 @@ public void testMvindexSingleElementPositive() { verifyResult(root, expectedResult); String expectedSparkSql = - "SELECT `array`('a', 'b', 'c')[1 + 1] `result`\n" + "FROM `scott`.`EMP`\n" + "LIMIT 1"; + "SELECT ARRAY('a', 'b', 'c')[1 + 1] `result`\n" + "FROM `scott`.`EMP`\n" + "LIMIT 1"; verifyPPLToSparkSQL(root, expectedSparkSql); } @@ -152,7 +152,7 @@ public void testMvindexSingleElementNegative() { verifyResult(root, expectedResult); String expectedSparkSql = - "SELECT `array`('a', 'b', 'c')[ARRAY_LENGTH(`array`('a', 'b', 'c')) + -1 + 1]" + "SELECT ARRAY('a', 'b', 'c')[ARRAY_LENGTH(ARRAY('a', 'b', 'c')) + -1 + 1]" + " `result`\n" + "FROM `scott`.`EMP`\n" + "LIMIT 1"; @@ -179,7 +179,7 @@ public void testMvindexRangePositive() { verifyResult(root, expectedResult); String expectedSparkSql = - "SELECT ARRAY_SLICE(`array`(1, 2, 3, 4, 5), 1, 3 - 1 + 1) `result`\n" + "SELECT ARRAY_SLICE(ARRAY(1, 2, 3, 4, 5), 1, 3 - 1 + 1) `result`\n" + "FROM `scott`.`EMP`\n" + "LIMIT 1"; verifyPPLToSparkSQL(root, expectedSparkSql); @@ -207,8 +207,8 @@ public void testMvindexRangeNegative() { verifyResult(root, expectedResult); String expectedSparkSql = - "SELECT ARRAY_SLICE(`array`(1, 2, 3, 4, 5), ARRAY_LENGTH(`array`(1, 2, 3, 4, 5)) + -3," - + " ARRAY_LENGTH(`array`(1, 2, 3, 4, 5)) + -1 - (ARRAY_LENGTH(`array`(1, 2, 3, 4, 5))" + "SELECT ARRAY_SLICE(ARRAY(1, 2, 3, 4, 5), ARRAY_LENGTH(ARRAY(1, 2, 3, 4, 5)) + -3," + + " ARRAY_LENGTH(ARRAY(1, 2, 3, 4, 5)) + -1 - (ARRAY_LENGTH(ARRAY(1, 2, 3, 4, 5))" + " + -3) + 1) `result`\n" + "FROM `scott`.`EMP`\n" + "LIMIT 1";