Skip to content

Commit

Permalink
Fix major serialization bug (#503)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #503

Found this bug while testing PL on Explat. There is an n^2 loop. The column implementation is already writing the values for each row to the byte buffers (https://fburl.com/code/a48hfogh). This effectively means we are processing this column n^2 times. For 1 million rows that is 1 trillion times we are calling this method 🤦‍♀️

Differential Revision: D43954084

fbshipit-source-id: 0ad2e372eacfa61d4331350814cd0629bd126abe
  • Loading branch information
Tal Davidi authored and facebook-github-bot committed Mar 9, 2023
1 parent b38024c commit 353a000
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,10 +324,8 @@ class RowStructureDefinition : public IRowStructureDefinition<schedulerId> {
}
}

for (int i = 0; i < writeBuffers.size(); i++) {
packedBitCol->serializeColumnAsPlaintextBytes(
bitPack, writeBuffers, byteOffset);
}
packedBitCol->serializeColumnAsPlaintextBytes(
bitPack, writeBuffers, byteOffset);
}
};

Expand Down

0 comments on commit 353a000

Please sign in to comment.