You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2019/09/23 22:43:00 UTC
[jira] [Resolved] (CALCITE-3327) Simplify SqlValidatorTest by
replacing 'boolean typeCoercion' parameter with fluent method
'Sql.withTypeCoercion(boolean)'
[ https://issues.apache.org/jira/browse/CALCITE-3327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde resolved CALCITE-3327.
----------------------------------
Fix Version/s: 1.22.0
Resolution: Fixed
Fixed in [405614f8|https://github.com/apache/calcite/commit/405614f87b75eb515e767b78a2c47481a0efc701].
If people have outstanding changes to SqlValidatorTest and SqlParserTest, they may not merge automatically. Sorry about that. It might be best to re-apply your changes, and if your code is calling methods that are now deprecated, you should inline those method calls. For example, if you were calling {{checkExp(sql, expected);}}, it will inline to {{expr(sql).ok(expected);}}.
> Simplify SqlValidatorTest by replacing 'boolean typeCoercion' parameter with fluent method 'Sql.withTypeCoercion(boolean)'
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: CALCITE-3327
> URL: https://issues.apache.org/jira/browse/CALCITE-3327
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Julian Hyde
> Priority: Major
> Fix For: 1.22.0
>
>
> Simplify SqlValidatorTest by replacing {{boolean typeCoercion}} parameter with fluent method {{withTypeCoercion(boolean)}} in class {{SqlValidatorTestCase.Sql}}.
> The problem with the {{boolean typeCoercion}} parameter is that it doesn't compose with all of the other flags we might want to pass - are we testing a query or an expression?, is it supposed to pass or fail?, does it contain window functions? - and therefore we have to add it in a combinatorial number of places.
> Fluent interfaces are preferred over "test methods" like {{checkExpFails}} for big tests like {{SqlValidatorTest}}.
> I'm developing a fix, and I'll post the branch URL shortly.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)