aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorOopsOutOfMemory <victorshengli@126.com>2015-06-17 13:37:59 -0700
committerMichael Armbrust <michael@databricks.com>2015-06-17 13:37:59 -0700
commit98ee3512b26e87eeb22693a4a61b2c4981f38ca4 (patch)
treeb6c978636f9b7ee8b8b2a9bd323cddca0303f07e /build
parenta46594435e0dd6cf86ac562bc11fc13d82b63c71 (diff)
downloadspark-98ee3512b26e87eeb22693a4a61b2c4981f38ca4.tar.gz
spark-98ee3512b26e87eeb22693a4a61b2c4981f38ca4.tar.bz2
spark-98ee3512b26e87eeb22693a4a61b2c4981f38ca4.zip
[SPARK-8010] [SQL] Promote types to StringType as implicit conversion in non-binary expression of HiveTypeCoercion
1. Given a query `select coalesce(null, 1, '1') from dual` will cause exception: java.lang.RuntimeException: Could not determine return type of Coalesce for IntegerType,StringType 2. Given a query: `select case when true then 1 else '1' end from dual` will cause exception: java.lang.RuntimeException: Types in CASE WHEN must be the same or coercible to a common type: StringType != IntegerType I checked the code, the main cause is the HiveTypeCoercion doesn't do implicit convert when there is a IntegerType and StringType. Numeric types can be promoted to string type Hive will always do this implicit conversion. Author: OopsOutOfMemory <victorshengli@126.com> Closes #6551 from OopsOutOfMemory/pnts and squashes the following commits: 7a209d7 [OopsOutOfMemory] rebase master 6018613 [OopsOutOfMemory] convert function to method 4cd5618 [OopsOutOfMemory] limit the data type to primitive type df365d2 [OopsOutOfMemory] refine 95cbd58 [OopsOutOfMemory] fix style 403809c [OopsOutOfMemory] promote non-string to string when can not found tighestCommonTypeOfTwo
Diffstat (limited to 'build')
0 files changed, 0 insertions, 0 deletions