summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/sbe/stages/hash_join.h
diff options
context:
space:
mode:
authorMickey. J Winters <mickey.winters@mongodb.com>2021-03-05 17:38:29 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-03-05 18:03:49 +0000
commita64f3aa45c6441268f8b28f9fc5eb13f7dc02448 (patch)
treed938c62cfd6b9289dfa242cc55f4c6236919f075 /src/mongo/db/exec/sbe/stages/hash_join.h
parent76e12a94289be9539ce5f597d3006d0df6044c42 (diff)
downloadmongo-a64f3aa45c6441268f8b28f9fc5eb13f7dc02448.tar.gz
SERVER-54025 Make HashAggStage's group-bys and HashJoinStage's key matching collation-aware
Diffstat (limited to 'src/mongo/db/exec/sbe/stages/hash_join.h')
-rw-r--r--src/mongo/db/exec/sbe/stages/hash_join.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mongo/db/exec/sbe/stages/hash_join.h b/src/mongo/db/exec/sbe/stages/hash_join.h
index f40af886a02..05ec1ec294a 100644
--- a/src/mongo/db/exec/sbe/stages/hash_join.h
+++ b/src/mongo/db/exec/sbe/stages/hash_join.h
@@ -43,6 +43,7 @@ public:
value::SlotVector outerProjects,
value::SlotVector innerCond,
value::SlotVector innerProjects,
+ boost::optional<value::SlotId> collatorSlot,
PlanNodeId planNodeId);
std::unique_ptr<PlanStage> clone() const final;
@@ -70,11 +71,12 @@ private:
const value::SlotVector _outerProjects;
const value::SlotVector _innerCond;
const value::SlotVector _innerProjects;
+ const boost::optional<value::SlotId> _collatorSlot;
// All defined values from the outer side (i.e. they come from the hash table).
value::SlotAccessorMap _outOuterAccessors;
- // Accessors of input codition values (keys) that are being inserted into the hash table.
+ // Accessors of input condition values (keys) that are being inserted into the hash table.
std::vector<value::SlotAccessor*> _inOuterKeyAccessors;
// Accessors of output keys.
@@ -86,15 +88,16 @@ private:
// Accessors of output projections.
std::vector<std::unique_ptr<HashProjectAccessor>> _outOuterProjectAccessors;
- // Accessors of input codition values (keys) that are being inserted into the hash table.
+ // Accessors of input condition values (keys) that are being inserted into the hash table.
std::vector<value::SlotAccessor*> _inInnerKeyAccessors;
+ // Accessor for collator. Only set if collatorSlot provided during construction.
+ value::SlotAccessor* _collatorAccessor = nullptr;
+
// Key used to probe inside the hash table.
value::MaterializedRow _probeKey;
- // TODO SERVER-54025: Update HashJoinStage so that it's mechanism for matching outer keys and
- // inner keys is collation-aware.
- TableType _ht;
+ boost::optional<TableType> _ht;
TableType::iterator _htIt;
TableType::iterator _htItEnd;