mirror of
https://github.com/apache/impala.git
synced 2026-01-04 09:00:56 -05:00
This adds DECODE functionality into the existing CaseExpr class. There will be no separate backend impementation for DECODE, it will be sent to the backend as a CASE expr so the existing codegen function can be used. Because Oracle does cast checking during execution and Impala cast checking during analysis, some uses of DECODE that are valid in Oracle are invalid in Impala. Ex: SELECT DECODE(foo, bar, int_col, baz, string_col_containing_only_ints) FROM ... would be run on Oracle. If string_col_containing_only_ints actually contained non-INTs, an error would be thrown during execution and no results would be returned. In Impala an error is thrown during analysis. If a CAST was added to the STRING column, a cast failure would result in NULL. Change-Id: Ia08cc2389abb6f843bba117e7091c659ad25ff41 Reviewed-on: http://gerrit.sjc.cloudera.com:8080/4334 Tested-by: jenkins Reviewed-by: Casey Ching <casey@cloudera.com> Tested-by: Casey Ching <casey@cloudera.com>
45 KiB
45 KiB