[ https://issues.apache.org/jira/browse/HAWQ-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15143655#comment-15143655 ]
Karthikeyan Jambu Rajaraman commented on HAWQ-403: -------------------------------------------------- Issue is fixed and pushed to Hawq master and 1.3 > Nested decode fails when inner decode return null > ------------------------------------------------- > > Key: HAWQ-403 > URL: https://issues.apache.org/jira/browse/HAWQ-403 > Project: Apache HAWQ > Issue Type: Bug > Components: Query Execution > Reporter: Karthikeyan Jambu Rajaraman > Assignee: George Caragea > > Nested decode fails when inner decode return null. > E.g. > --- > --- Drop existing table > --- > DROP TABLE IF EXISTS t; > --- > --- Create new table t > --- > CREATE TABLE t(pid INT, wid INT, state CHARACTER VARYING(30)); > --- > --- Insert a row and keep state as empty > --- > INSERT INTO t VALUES(1, 1); > --- > --- use nested decode > --- > SELECT DECODE(DECODE(state, '', NULL, state), '-', NULL, state) AS state FROM > t; -- This message was sent by Atlassian JIRA (v6.3.4#6332)