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/09/06 06:41:06 UTC

[GitHub] [doris] cambyzju opened a new pull request, #12378: [enhancement](array-type) avoid abuse of Offset and Offset64

cambyzju opened a new pull request, #12378:
URL: https://github.com/apache/doris/pull/12378

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem summary
   
   Describe your changes.
   
   We already separate Array Offset64 and String Offset(32bit) in PR: https://github.com/apache/doris/pull/12341
   
   Now we limit: Offset inside IColumn, Offset64 only inside ColumnArray, to avoid abuse of them.
   If we use the wrong one, it will compile failed.
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: 
       - [ ] Yes
       - [ ] No
       - [ ] I don't know
   2. Has unit tests been added:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   3. Has document been added or modified:
       - [ ] Yes
       - [ ] No
       - [ ] No Need
   4. Does it need to update dependencies:
       - [ ] Yes
       - [ ] No
   5. Are there any changes that cannot be rolled back:
       - [ ] Yes (If Yes, please explain WHY)
       - [ ] 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] [doris] cambyzju commented on a diff in pull request #12378: [enhancement](array-type) avoid abuse of Offset and Offset64

Posted by GitBox <gi...@apache.org>.
cambyzju commented on code in PR #12378:
URL: https://github.com/apache/doris/pull/12378#discussion_r964883352


##########
be/src/vec/columns/column_array.h:
##########
@@ -45,6 +45,18 @@ class ColumnArray final : public COWHelper<IColumn, ColumnArray> {
 
     ColumnArray(const ColumnArray&) = default;
 
+public:
+    // offsets of array is 64bit wise
+    using Offset64 = IColumn::Offset64;
+    using Offsets64 = IColumn::Offsets64;
+
+private:
+    // please use IColumn::Offset if we really need 32bit offset, otherwise use ColumnArray::Offset64
+    using Offset [[deprecated("ColumnArray::Offset64 for Array, IColumn::Offset for String")]] =

Review Comment:
   Do not find any method to delete typedef Offset in ColumnArray now.
   
   So we define it inside private region and mark it as deprecated.
   



-- 
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] [doris] github-actions[bot] commented on pull request #12378: [enhancement](array-type) avoid abuse of Offset and Offset64

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12378:
URL: https://github.com/apache/doris/pull/12378#issuecomment-1239820861

   PR approved by at least one committer and no changes requested.


-- 
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] [doris] yiguolei merged pull request #12378: [enhancement](array-type) avoid abuse of Offset and Offset64

Posted by GitBox <gi...@apache.org>.
yiguolei merged PR #12378:
URL: https://github.com/apache/doris/pull/12378


-- 
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] [doris] github-actions[bot] commented on pull request #12378: [enhancement](array-type) avoid abuse of Offset and Offset64

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #12378:
URL: https://github.com/apache/doris/pull/12378#issuecomment-1239820897

   PR approved by anyone and no changes requested.


-- 
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] [doris] xy720 commented on a diff in pull request #12378: [enhancement](array-type) avoid abuse of Offset and Offset64

Posted by GitBox <gi...@apache.org>.
xy720 commented on code in PR #12378:
URL: https://github.com/apache/doris/pull/12378#discussion_r964818244


##########
be/src/vec/columns/column_array.h:
##########
@@ -45,6 +45,18 @@ class ColumnArray final : public COWHelper<IColumn, ColumnArray> {
 
     ColumnArray(const ColumnArray&) = default;
 
+public:
+    // offsets of array is 64bit wise
+    using Offset64 = IColumn::Offset64;
+    using Offsets64 = IColumn::Offsets64;
+
+private:
+    // please use IColumn::Offset if we really need 32bit offset, otherwise use ColumnArray::Offset64
+    using Offset [[deprecated("ColumnArray::Offset64 for Array, IColumn::Offset for String")]] =

Review Comment:
   Why should we still keep the ColumnArray::Offset, are there any other place still using it?



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