a7301065d7
Fixes the inconsistency between the type of the object returned by the `SIGN()/SIGNUM()` SQL functions and the specified `DataType`. In the Class Sign, DataType is DataTypes.INTEGER. The source code is as follows: ``` public DataType dataType() { return DataTypes.INTEGER; } ``` But In the Class MathProcessor, the source code of SIGN((Object l), Parameter and return value types are the same. Therefore, when using double or float parameters to test, there is a little problem, the test method is like the following curl : ``` curl -XPOST 127.0.0.1:9200/_sql -d "{\"query\":\"select SIGN(1.0) \"}" \ -H 'Content-Type: application/json' ``` The result is: ``` {"columns":[{"name":"SIGN(1.0)","type":"integer"}],"rows":[[1.0]]} ``` The result value is `1.0`, but the type is `integer`. Signed-off-by: mantuliu <240951888@qq.com> Co-authored-by: Marios Trivyzas <matriv@gmail.com> (cherry picked from commits aa78301e71f, ced3c1281c7, 40e5b9b) |
||
---|---|---|
.. | ||
dev-tools | ||
docs | ||
license-tools | ||
plugin | ||
qa | ||
snapshot-tool | ||
test | ||
transport-client | ||
NOTICE.txt | ||
README.md | ||
build.gradle |
README.md
Elastic License Functionality
This directory tree contains files subject to the Elastic License. The files subject to the Elastic License are grouped in this directory to clearly separate them from files licensed under the Apache License 2.0.