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/05/27 08:18:50 UTC

[GitHub] [incubator-doris] adonis0147 opened a new issue, #9808: [feature-wip](array-type) Support array type which doesn't contain null

adonis0147 opened a new issue, #9808:
URL: https://github.com/apache/incubator-doris/issues/9808

   ### 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.
   
   
   ### Description
   
   This issue is a subtask of https://github.com/apache/incubator-doris/issues/7570 .
   
   It proposes an approach to distinguish two array types:
   1. An array type which doesn't contain null values.
   2. An array type which contains null values.
   
   Some other softwares have similar features.
   
   **ClickHouse**
   See [Array(t)](https://clickhouse.com/docs/en/sql-reference/data-types/array/)
   
   Examples:
   1. Array(UInt8)
   2. Array(Nullable(UInt8))
   
   **Spark**
   See [ArrayType](https://sparkbyexamples.com/spark/spark-array-arraytype-dataframe-column)
   
   Examples:
   1. DataTypes.createArrayType(StringType)
   2. DataTypes.createArrayType(StringType, false) - `false` here indicates the type doesn't contain null values.
   
   ## Proposed syntax
   1. ```ARRAY<TYPE>``` - contains null by default (behaves like Spark and Postgres)
   2. ```ARRAY<NOT_NULL(TYPE)>``` - doesn't contain null
   
   ### Use case
   
   ```shell
   mysql> create table array_type_table(k1 INT, k2 Array<not_null(int)>) duplicate key (k1)
       -> distributed by hash(k1) buckets 1 properties('replication_num' = '1');
   ```
   
   ### Related issues
   
   #7570
   
   ### Are you willing to submit PR?
   
   - [X] 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] [incubator-doris] morningman closed issue #9808: [feature-wip](array-type) Support array type which doesn't contain null

Posted by GitBox <gi...@apache.org>.
morningman closed issue #9808: [feature-wip](array-type) Support array type which doesn't contain null
URL: https://github.com/apache/incubator-doris/issues/9808


-- 
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