Sahil Takiar has posted comments on this change. ( http://gerrit.cloudera.org:8080/15363 )
Change subject: IMPALA-5904: (part 3) Fix more TSAN bugs ...................................................................... Patch Set 2: I thought this was working, but the following query is actually causing a crash: select lead(-496, 81) over (order by t1.double_col desc, t1.id asc) from functional.alltypestiny t1 where 5 = 6 union select 794.67 from functional.alltypes t1 where 5 = 6 union all select coalesce(10.4, int_col) from functional.alltypes where false The reason is that now llvm_field_idx_ is being set for every tuple, not just for the tuples where nodes call GetLlvmStruct. The issue is that for some tuples, slots have duplicate values for slot_idx_. This breaks SlotsOrderedByIdx() because (1) it allocates a vector of size = slots().size() and (2) it tries to order slots by slot_idx_, but since there a duplicate values of slot_idx_ it ends up returning a vector with a nullptr. This occurs for the query above for the tuple: Tuple(id=0 size=0 slots=[Slot(id=0 type=DOUBLE col_path=[9] offset=-1 null=(offset=0 mask=1) slot_idx=0 field_idx=-1), Slot(id=1 type=INT col_path=[2] offset=-1 null=(offset=0 mask=1) slot_idx=0 field_idx=-1)] tuple_path=[]) Not sure how to get around this. I guess these slots aren't actually materialized so they don't need their slot_idx set. Maybe there is a way to detect this and skip these tuples? I guess if the size = 0 the slots are presumably not materialized. Or maybe just check for tuples with duplicate slot_idxs and skip them. -- To view, visit http://gerrit.cloudera.org:8080/15363 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I99b7b119e256085d1ba6977e1161fc658273b242 Gerrit-Change-Number: 15363 Gerrit-PatchSet: 2 Gerrit-Owner: Sahil Takiar <stak...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Sahil Takiar <stak...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Comment-Date: Thu, 12 Mar 2020 23:07:13 +0000 Gerrit-HasComments: No