[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
5 files changed
tree: 018576e8aeec088d3cf902ffa29c029b9d868c4e
  1. avatica/
  2. cassandra/
  3. core/
  4. druid/
  5. elasticsearch/
  6. example/
  7. linq4j/
  8. mongodb/
  9. piglet/
  10. plus/
  11. site/
  12. spark/
  13. splunk/
  14. src/
  15. ubenchmark/
  16. .gitattributes
  17. .gitignore
  18. .travis.yml
  19. KEYS
  20. LICENSE
  21. NOTICE
  22. pom.xml
  23. README
  24. README.md
  25. sqlline
  26. sqlline.bat
README.md

Build Status

Apache Calcite

Apache Calcite is a dynamic data management framework.

For more details, see the home page.