Skip to content

Commit

Permalink
fix indent
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGe00 committed Oct 30, 2024
1 parent bc25437 commit 01abeb2
Showing 1 changed file with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -724,25 +724,25 @@ public void testReflectFunctionReturnType() {
assertEquals(createCoralSpark(relNode).getSparkSql(), targetSql);
}

@Test
public void testJavaMethodFunction() {
RelNode relNode = TestUtils.toRelNode("SELECT java_method('java.lang.String', 'valueOf', 1) FROM default.complex");
String targetSql = "SELECT reflect('java.lang.String', 'valueOf', 1)\n" + "FROM default.complex complex";
assertEquals(createCoralSpark(relNode).getSparkSql(), targetSql);
}
@Test
public void testJavaMethodFunction() {
RelNode relNode = TestUtils.toRelNode("SELECT java_method('java.lang.String', 'valueOf', 1) FROM default.complex");
String targetSql = "SELECT reflect('java.lang.String', 'valueOf', 1)\n" + "FROM default.complex complex";
assertEquals(createCoralSpark(relNode).getSparkSql(), targetSql);
}

@Test
public void testJavaMethodFunctionReturnType() {
RelNode relNode =
TestUtils.toRelNode("SELECT java_method('java.lang.String', 'valueOf', 1) + 1 FROM default.complex");
String targetSql =
"SELECT CAST(reflect('java.lang.String', 'valueOf', 1) AS INTEGER) + 1\n" + "FROM default.complex complex";
assertEquals(createCoralSpark(relNode).getSparkSql(), targetSql);

relNode = TestUtils.toRelNode("SELECT java_method('java.lang.String', 'valueOf', 1) || 'a' FROM default.complex");
targetSql = "SELECT concat(reflect('java.lang.String', 'valueOf', 1), 'a')\n" + "FROM default.complex complex";
assertEquals(createCoralSpark(relNode).getSparkSql(), targetSql);
}
@Test
public void testJavaMethodFunctionReturnType() {
RelNode relNode =
TestUtils.toRelNode("SELECT java_method('java.lang.String', 'valueOf', 1) + 1 FROM default.complex");
String targetSql =
"SELECT CAST(reflect('java.lang.String', 'valueOf', 1) AS INTEGER) + 1\n" + "FROM default.complex complex";
assertEquals(createCoralSpark(relNode).getSparkSql(), targetSql);

relNode = TestUtils.toRelNode("SELECT java_method('java.lang.String', 'valueOf', 1) || 'a' FROM default.complex");
targetSql = "SELECT concat(reflect('java.lang.String', 'valueOf', 1), 'a')\n" + "FROM default.complex complex";
assertEquals(createCoralSpark(relNode).getSparkSql(), targetSql);
}

@Test
public void testNegationOperator() {
Expand Down

0 comments on commit 01abeb2

Please sign in to comment.