JSON_TABLE bug ?

Database
The Teradata Database channel includes discussions around advanced Teradata features such as high-performance parallel database technology, the optimizer, mixed workload management solutions, and other related technologies.
Teradata Employee

JSON_TABLE bug ?

Hello,

 

testing on 15.10.04.03

this sample code :

 

CREATE MULTISET TABLE TEST_JSON_20180914
(
     ROW_ID INTEGER
    ,COL_JSON JSON CHARACTER SET LATIN
    ,COL_CHAR CHAR(1) CHARACTER SET LATIN
    ,COL_VARCHAR VARCHAR(1) CHARACTER SET LATIN
    ,COL_INTEGER INTEGER
)
PRIMARY INDEX (ROW_ID);

INSERT INTO TEST_JSON_20180914 VALUES(1,'{"a":"val_a","b":"val_b"}',NULL,NULL,NULL);

SELECT
       ROW_ID
      ,COL_JSON_ELMT_A
      ,COL_JSON_ELMT_B
      ,COL_JSON
      ,COL_CHAR
      ,COL_VARCHAR
      ,COL_INTEGER
      ,CHAR2HEXINT(COL_CHAR) AS CHAR2HEXINT_COL_CHAR
      ,CHAR2HEXINT(COL_VARCHAR) AS CHAR2HEXINT_COL_VARCHAR
 FROM JSON_TABLE
 ( ON
     (
        SELECT
               w.ROW_ID
              ,w.COL_JSON
              ,w.COL_JSON AS COL_JSON_DP
              ,w.COL_CHAR
              ,w.COL_VARCHAR
              ,w.COL_INTEGER
          FROM TEST_JSON_20180914 w
     ) USING ROWEXPR('$')
             COLEXPR('[
                        {"jsonpath" : "$.a", "type" : "VARCHAR(50)"}
                       ,{"jsonpath" : "$.b", "type" : "VARCHAR(50)"}
                    ]')
 ) AS JT (
           ROW_ID
          ,COL_JSON_ELMT_A
          ,COL_JSON_ELMT_B
          ,COL_JSON
          ,COL_CHAR
          ,COL_VARCHAR
          ,COL_INTEGER
         );

as you may reproduce on your systems :

Using JSON_TABLE with extra columns, I have an issue when the extra column :
- is retrieved from a table
- is in CHAR(n) format or INTEGER format (didn't test other numeric types)
- has null value

In the output the value is supposed to be NULL but it is not. It contains the Hex NUL values ( hex code : 00 ) for char and 0 for integer

Do you think this is a bug ?