commit | 80240720ec7de7b68dec8741d2322d9cd7f989ed | [log] [tgz] |
---|---|---|
author | Jungtaek Lim <kabhwan@gmail.com> | Tue Oct 18 11:10:16 2016 +0900 |
committer | Julian Hyde <jhyde@apache.org> | Wed Oct 26 16:56:22 2016 -0700 |
tree | 018576e8aeec088d3cf902ffa29c029b9d868c4e | |
parent | 08eb16bb5e0ef70695e305967eeac1dd79624420 [diff] |
[CALCITE-1453] Support ANY type with binary comparison and arithmetic operators (Jungtaek Lim) ANY type is represented as Object. There's not enough overloaded backup methods for comparison and arithmetic operators so if one or both parameters have ANY type, Calcite cannot find the matched method. This patch adds overloaded methods for comparison and arithmetic operators whose parameters are (Object, Object). And if either parameter is ANY, it boxes primitive type parameter so that it can be matched to Object, Object. Newly added overloaded methods are smart that they can handle different Number types for parameters. However, the implementation has some downsides: 1. requires converting to BigDecimal 2. the result of arithmetic is also BigDecimal Close apache/calcite#311
Apache Calcite is a dynamic data management framework.
For more details, see the home page.