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/03/03 03:17:04 UTC

[GitHub] [incubator-doris] adonis0147 opened a new pull request #8305: [feature-wip][array-type] Support nested array insertion.

adonis0147 opened a new pull request #8305:
URL: https://github.com/apache/incubator-doris/pull/8305


   # Proposed changes
   
   Issue Number: close #8304 .
   
   ## Problem Summary:
   
   Please refer to #8304 .
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: No
   2. Has unit tests been added: Yes
   3. Has document been added or modified: No
   4. Does it need to update dependencies: No
   5. Are there any changes that cannot be rolled back: No
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


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


[GitHub] [incubator-doris] adonis0147 commented on a change in pull request #8305: [feature-wip][array-type] Support nested array insertion.

Posted by GitBox <gi...@apache.org>.
adonis0147 commented on a change in pull request #8305:
URL: https://github.com/apache/incubator-doris/pull/8305#discussion_r823287292



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
##########
@@ -373,6 +373,9 @@ private void toChildrenThrift(Column column, TColumn tColumn) {
             childrenTColumnType.setIndexLen(children.getOlapColumnIndexSize());
             childrenTColumn.setColumnType(childrenTColumnType);
             childrenTColumn.setIsAllowNull(children.isAllowNull());
+            if (tColumn.getAggregationType() != null) {
+                childrenTColumn.setAggregationType(tColumn.getAggregationType());

Review comment:
       Added.




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


[GitHub] [incubator-doris] morningman merged pull request #8305: [feature-wip][array-type] Support nested array insertion.

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #8305:
URL: https://github.com/apache/incubator-doris/pull/8305


   


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


[GitHub] [incubator-doris] adonis0147 commented on a change in pull request #8305: [feature-wip][array-type] Support nested array insertion.

Posted by GitBox <gi...@apache.org>.
adonis0147 commented on a change in pull request #8305:
URL: https://github.com/apache/incubator-doris/pull/8305#discussion_r820847392



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
##########
@@ -373,6 +373,9 @@ private void toChildrenThrift(Column column, TColumn tColumn) {
             childrenTColumnType.setIndexLen(children.getOlapColumnIndexSize());
             childrenTColumn.setColumnType(childrenTColumnType);
             childrenTColumn.setIsAllowNull(children.isAllowNull());
+            if (tColumn.getAggregationType() != null) {
+                childrenTColumn.setAggregationType(tColumn.getAggregationType());

Review comment:
       The parent aggregate type is `NONE` by default for array type.
   If we don't set the aggregate type for the children column, after deserializing in BE, the aggregate type of the children column is `TAggregationType::type::SUM`, because the value of `TAggregationType::type::SUM` is zero.  That is incorrect.




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


[GitHub] [incubator-doris] morningman commented on a change in pull request #8305: [feature-wip][array-type] Support nested array insertion.

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #8305:
URL: https://github.com/apache/incubator-doris/pull/8305#discussion_r823247577



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
##########
@@ -373,6 +373,9 @@ private void toChildrenThrift(Column column, TColumn tColumn) {
             childrenTColumnType.setIndexLen(children.getOlapColumnIndexSize());
             childrenTColumn.setColumnType(childrenTColumnType);
             childrenTColumn.setIsAllowNull(children.isAllowNull());
+            if (tColumn.getAggregationType() != null) {
+                childrenTColumn.setAggregationType(tColumn.getAggregationType());

Review comment:
       It seems to be a design problem. Please add this comment to the code for notice.




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


[GitHub] [incubator-doris] morningman commented on a change in pull request #8305: [feature-wip][array-type] Support nested array insertion.

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #8305:
URL: https://github.com/apache/incubator-doris/pull/8305#discussion_r820833353



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
##########
@@ -373,6 +373,9 @@ private void toChildrenThrift(Column column, TColumn tColumn) {
             childrenTColumnType.setIndexLen(children.getOlapColumnIndexSize());
             childrenTColumn.setColumnType(childrenTColumnType);
             childrenTColumn.setIsAllowNull(children.isAllowNull());
+            if (tColumn.getAggregationType() != null) {
+                childrenTColumn.setAggregationType(tColumn.getAggregationType());

Review comment:
       why need to set agg type for child column?




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


[GitHub] [incubator-doris] adonis0147 commented on a change in pull request #8305: [feature-wip][array-type] Support nested array insertion.

Posted by GitBox <gi...@apache.org>.
adonis0147 commented on a change in pull request #8305:
URL: https://github.com/apache/incubator-doris/pull/8305#discussion_r820847392



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
##########
@@ -373,6 +373,9 @@ private void toChildrenThrift(Column column, TColumn tColumn) {
             childrenTColumnType.setIndexLen(children.getOlapColumnIndexSize());
             childrenTColumn.setColumnType(childrenTColumnType);
             childrenTColumn.setIsAllowNull(children.isAllowNull());
+            if (tColumn.getAggregationType() != null) {
+                childrenTColumn.setAggregationType(tColumn.getAggregationType());

Review comment:
       The parent aggregate type is `NONE` by default for array type. If we don't set the aggregate type for the children column, after deserializing in BE, the aggregate type of the children column is `TAggregationType::type::SUM`, because the value of `TAggregationType::type::SUM` is zero.




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