| 1229 | } |
| 1230 | |
| 1231 | string PartitionedHashJoinNode::NodeDebugString() const { |
| 1232 | stringstream ss; |
| 1233 | ss << "PartitionedHashJoinNode (id=" << id() << " op=" << join_op_ |
| 1234 | << " #spilled_partitions=" << spilled_partitions_.size() << ")" << endl; |
| 1235 | |
| 1236 | if (builder_ != nullptr) { |
| 1237 | ss << "PhjBuilder: " << builder_->DebugString(); |
| 1238 | } |
| 1239 | |
| 1240 | ss << "Probe hash partitions: " << probe_hash_partitions_.size() << ":" << endl; |
| 1241 | for (int i = 0; i < probe_hash_partitions_.size(); ++i) { |
| 1242 | ProbePartition* probe_partition = probe_hash_partitions_[i].get(); |
| 1243 | ss << " Probe hash partition " << i << ": "; |
| 1244 | if (probe_partition != nullptr) { |
| 1245 | ss << "probe ptr=" << probe_partition; |
| 1246 | BufferedTupleStream* probe_rows = probe_partition->probe_rows(); |
| 1247 | if (probe_rows != nullptr) { |
| 1248 | ss << " Probe Rows: " << probe_rows->num_rows() |
| 1249 | << " (Bytes total/pinned: " << probe_rows->byte_size() << "/" |
| 1250 | << probe_rows->BytesPinned(false) << ")"; |
| 1251 | } |
| 1252 | } |
| 1253 | ss << endl; |
| 1254 | } |
| 1255 | |
| 1256 | if (!spilled_partitions_.empty()) { |
| 1257 | ss << "SpilledPartitions" << endl; |
| 1258 | for (const auto& entry : spilled_partitions_) { |
| 1259 | ProbePartition* probe_partition = entry.second.get(); |
| 1260 | PhjBuilderPartition* build_partition = probe_partition->build_partition(); |
| 1261 | DCHECK(build_partition->is_spilled()); |
| 1262 | DCHECK(build_partition->hash_tbl() == nullptr); |
| 1263 | int build_rows = build_partition->build_rows() == nullptr ? -1 : |
| 1264 | build_partition->build_rows()->num_rows(); |
| 1265 | int probe_rows = probe_partition->probe_rows() == nullptr ? -1 : |
| 1266 | probe_partition->probe_rows()->num_rows(); |
| 1267 | ss << " ProbePartition (id=" << entry.first << "):" << probe_partition << endl |
| 1268 | << " Spilled Build Rows: " << build_rows << endl |
| 1269 | << " Spilled Probe Rows: " << probe_rows << endl; |
| 1270 | } |
| 1271 | } |
| 1272 | if (input_partition_ != nullptr) { |
| 1273 | DCHECK(input_partition_->probe_rows() != nullptr); |
| 1274 | ss << "InputPartition: " << input_partition_.get() << endl; |
| 1275 | PhjBuilderPartition* build_partition = input_partition_->build_partition(); |
| 1276 | if (build_partition->IsClosed()) { |
| 1277 | ss << " Build Partition Closed" << endl; |
| 1278 | } else { |
| 1279 | ss << " Spilled Build Rows: " << build_partition->build_rows()->num_rows() << endl; |
| 1280 | } |
| 1281 | ss << " Spilled Probe Rows: " << input_partition_->probe_rows()->num_rows() << endl; |
| 1282 | } else { |
| 1283 | ss << "InputPartition: NULL" << endl; |
| 1284 | } |
| 1285 | |
| 1286 | if (null_aware_probe_partition_ != nullptr) { |
| 1287 | ss << "null-aware probe partition ptr=" << null_aware_probe_partition_.get(); |
| 1288 | BufferedTupleStream* probe_rows = null_aware_probe_partition_->probe_rows(); |
nothing calls this directly
no test coverage detected