Adding safe divide function (#11904)
authorsomu-imply <93540295+somu-imply@users.noreply.github.com>
Wed, 17 Nov 2021 16:22:41 +0000 (08:22 -0800)
committerGitHub <noreply@github.com>
Wed, 17 Nov 2021 16:22:41 +0000 (08:22 -0800)
commit29710789a438bd2c16bf2d1e556b96f8ccb57611
tree1855972ce92a1d2514a6374d1f0c3eb6b4cb73db
parentd76e6467004094aef7279903e64532515fde1e95
Adding safe divide function (#11904)

* IMPLY-4344: Adding safe divide function along with testcases and documentation updates

* Changing based on review comments

* Addressing review comments, fixing coding style, docs and spelling

* Checkstyle passes for all code

* Fixing expected results for infinity

* Revert "Fixing expected results for infinity"

This reverts commit 5fd5cd480dd29706dd6e4b3c736611fe8dc74c85.

* Updating test result and a space in docs
core/src/main/java/org/apache/druid/math/expr/Function.java
core/src/test/java/org/apache/druid/math/expr/FunctionTest.java
core/src/test/java/org/apache/druid/math/expr/OutputTypeTest.java
docs/misc/math-expr.md
docs/querying/sql.md
sql/src/main/java/org/apache/druid/sql/calcite/expression/builtin/SafeDivideOperatorConversion.java [new file with mode: 0644]
sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidOperatorTable.java
sql/src/test/java/org/apache/druid/sql/calcite/CalciteQueryTest.java
website/.spelling