Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Bump Calcite to preserve LATERALs in LATERAL UNNEST calls (li…
Browse files Browse the repository at this point in the history
…nkedin#542)"

This reverts commit 15fc504.
simbadzina committed Jan 22, 2025
1 parent 15fc504 commit b83baad
Showing 3 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -261,17 +261,6 @@ public void testLateralViewOuter() {
assertEquals(convertToSparkSql, targetSql);
}

@Test
public void testLateralViewOuterWithExtractUnion() {
RelNode relNode = TestUtils.toRelNode(String.join("\n", "", "SELECT extract_union(ut), t.ccol", "FROM complex",
"LATERAL VIEW OUTER explode(complex.c) t as ccol"));
String convertToSparkSql = createCoralSpark(relNode).getSparkSql();

String targetSql = "SELECT coalesce_struct(complex.ut, 'uniontype<int>'), t0.ccol\n"
+ "FROM default.complex complex LATERAL VIEW OUTER EXPLODE(complex.c) t0 AS ccol";
assertEquals(convertToSparkSql, targetSql);
}

@Test
public void testMultipleLateralView() {
RelNode relNode = TestUtils.toRelNode(String.join("\n", "", "SELECT a, t.ccol, t2.ccol2", "FROM complex ",
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ public static void initializeViews(HiveConf conf) throws HiveException, MetaExce
run(driver, "CREATE TABLE IF NOT EXISTS baz(`timestamp` int, `select` double)");
run(driver, "CREATE VIEW IF NOT EXISTS baz_view as select `select`, `timestamp` from baz");
run(driver,
"CREATE TABLE IF NOT EXISTS complex(a int, b string, c array<double>, s struct<name:string, age:int>, m map<string, int>, sarr array<struct<name:string, age:int>>, ut uniontype<int>)");
"CREATE TABLE IF NOT EXISTS complex(a int, b string, c array<double>, s struct<name:string, age:int>, m map<string, int>, sarr array<struct<name:string, age:int>>)");

String baseComplexSchema = loadSchema("base-complex.avsc");
executeCreateTableQuery(driver, "default", "basecomplex", baseComplexSchema);
2 changes: 1 addition & 1 deletion gradle/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ def versions = [
'jetbrains': '16.0.2',
'jline': '0.9.94',
'kryo': '2.22',
'linkedin-calcite-core': '1.21.0.265',
'linkedin-calcite-core': '1.21.0.262',
'pig': '0.15.0',
'spark': '2.4.0',
'spark3': '3.1.1',

0 comments on commit b83baad

Please sign in to comment.