Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/dev/intro-v3-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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";
Expand All @@ -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);
Expand Down Expand Up @@ -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";
Expand Down
Loading