Github user zellerh commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/17#discussion_r33944499
--- Diff: core/sql/optimizer/NAClusterInfo.cpp ---
@@ -296,13 +299,13 @@ NAClusterInfo::NAClusterInfo(CollHeap * heap)
// Hash Map to store NodeName and NoideIds
nodeNameToNodeIdMap_ = new (heap) NAHashDictionary<NAString, Int32>
(NAString::hash, 101, TRUE, heap_);
- dp2NameToInfoMap_ = new(heap) NAHashDictionary<DP2name,DP2info>
- (&dp2DescHashFunc, 101,TRUE,heap);
+
clusterToCPUMap_ = new(heap) NAHashDictionary<CollIndex,maps>
- (&clusterNumHashFunc,17,TRUE, heap);
- tableToClusterMap_ = new(heap) NAHashDictionary<CollIndex, maps>
- (&tableIdentHashFunc, 13, TRUE, heap);
-
+
(&clusterNumHashFunc,17,TRUE, heap);
+
+ nodeIdToNodeNameMap_ = new(heap) NAHashDictionary<Int32, NAString>
+ (&intHashFunc,
101,TRUE,heap);
+
--- End diff --
This is ok, but I'm wondering whether an array wouldn't be easier, since
this translates integer node ids into node names?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---