You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/10/24 09:06:39 UTC

[GitHub] [doris] ChPi opened a new issue, #13598: [Bug] json_object function return null on vectorized engine

ChPi opened a new issue, #13598:
URL: https://github.com/apache/doris/issues/13598

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Version
   
   1.1.3
   
   ### What's Wrong?
   
   `json_object('k', k)` function return `NULL` if k is null on vectorized engine,
   it should return `{"k":null}` like doc example 
   ```sql
   MySQL> select json_object('username',null);
   +---------------------------------+
   | json_object('username', 'NULL') |
   +---------------------------------+
   | {"username": NULL}              |
   +---------------------------------+
   ```
   
   ### What You Expected?
   
   return `{"k":null}`
   
   ### How to Reproduce?
   
   create 
   ```sql
   CREATE TABLE `test_query_json_object` (
                 `k1` int(11) NULL COMMENT "user id"
               ) ENGINE=OLAP
               DUPLICATE KEY(`k1`)
               COMMENT "OLAP"
               DISTRIBUTED BY HASH(`k1`) BUCKETS 1
               PROPERTIES (
               "replication_allocation" = "tag.location.default: 1",
               "in_memory" = "false",
               "storage_format" = "V2"
               );
   insert into test_query_json_object values(null);
   set enable_vectorized_engine=true;
   ```
   query
   ```sql
   mysql> select json_object('k1',k1) from test_query_json_object;
   +-------------------------+
   | json_object('k1', `k1`) |
   +-------------------------+
   | NULL                    |
   +-------------------------+
   1 row in set (0.01 sec)
   ```
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] morningman closed issue #13598: [Bug] json_object function return null on vectorized engine

Posted by GitBox <gi...@apache.org>.
morningman closed issue #13598: [Bug] json_object function return null on vectorized engine
URL: https://github.com/apache/doris/issues/13598


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org