Zoltan Borok-Nagy has posted comments on this change. ( http://gerrit.cloudera.org:8080/17374 )
Change subject: IMPALA-10691: Fix multithreading related crash in CAST FORMAT ...................................................................... Patch Set 3: Code-Review+1 (1 comment) http://gerrit.cloudera.org:8080/#/c/17374/3/be/src/exprs/cast-format-expr.cc File be/src/exprs/cast-format-expr.cc: http://gerrit.cloudera.org:8080/#/c/17374/3/be/src/exprs/cast-format-expr.cc@38 PS3, Line 38: std::make_unique<DateTimeFormatContext>(format_.c_str(), format_.length()); optional: You can even track the allocation in the function context if you want: https://github.com/apache/impala/blob/f672c315bc4d08d56cc7399b86767d30c9676287/be/src/udf/udf.h#L191-L196 That way we would get an error if we somehow forget to free dt_ctx later. There's also FunctionContext::Allocate()/Free but it's a bit cumbersome to use. -- To view, visit http://gerrit.cloudera.org:8080/17374 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I501c8a184591b1c836b2ca4cada1f2117f9f5c99 Gerrit-Change-Number: 17374 Gerrit-PatchSet: 3 Gerrit-Owner: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Fri, 30 Apr 2021 15:13:23 +0000 Gerrit-HasComments: Yes
