Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/21502 )
Change subject: IMPALA-13138: Never smallify existing StringValue objects, only new ones during DeepCopy ...................................................................... Patch Set 2: Code-Review+1 (2 comments) http://gerrit.cloudera.org:8080/#/c/21502/2/be/src/runtime/string-value.h File be/src/runtime/string-value.h: http://gerrit.cloudera.org:8080/#/c/21502/2/be/src/runtime/string-value.h@188 PS2, Line 188: /// !!! THIS IS UNSAFE TO CALL ON EXISTING STRINGVALUE OBJECTS !!! This seems true for all function that modify the StringValue, e.g. Clear() or Assign(). The problem with smallifying in BufferedTupleStream::ComputeRowSizeAndSmallifyStrings was that it modified a "shared" tuple that could be also used in other rows. I think that a more elegant solution to prevent this would be to use "const" methodically for Tuple / TupleRow, so if we have a Tuple that must not be modified, then use a const version of it. http://gerrit.cloudera.org:8080/#/c/21502/2/be/src/runtime/string-value.h@190 PS2, Line 190: /// target StringValue object of a deep copy operation. Can you also add a comment about this to the callsite in tuple.cc? -- To view, visit http://gerrit.cloudera.org:8080/21502 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I739048b37a59a81c41c85d475fad00cb520a5f99 Gerrit-Change-Number: 21502 Gerrit-PatchSet: 2 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Gabor Kaszab <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Wed, 12 Jun 2024 15:41:02 +0000 Gerrit-HasComments: Yes
