vlsi commented on a change in pull request #2435:
URL: https://github.com/apache/calcite/pull/2435#discussion_r662556820
##########
File path: core/src/test/java/org/apache/calcite/tools/PlannerTest.java
##########
@@ -1525,4 +1527,67 @@ private void checkView(String sql, Matcher<String>
matcher)
final RelRoot root = planner.rel(validate);
assertThat(toString(root.rel), matcher);
}
+
+ /** Test case for <a
href="https://issues.apache.org/jira/browse/CALCITE-4642">[CALCITE-4642]
+ * Checks that custom type systems can be registered in a planner by
+ * comparing options for converting unions of chars.</a>.
+ */
+ @Test void testCustomTypeSystem() throws Exception {
+ final String sql = "select Case when DEPTNO <> 30 then 'hi' else 'world'
end from dept";
+ final String expectedVarying = "LogicalProject("
+ + "EXPR$0=["
+ + "CASE(<>($0, 30),"
+ + " 'hi':VARCHAR(5), "
+ + "'world':VARCHAR(5))])\n"
+ + " LogicalValues("
+ + "tuples=[[{ 10, 'Sales' },"
+ + " { 20, 'Marketing' },"
+ + " { 30, 'Engineering' },"
+ + " { 40, 'Empty' }]])\n";
Review comment:
Ok, whatever. It took me a while to understand the plan, as I had to
search for `\n`, so I asked.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]