-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Break PrestoSerializer.cpp into components #11922
base: main
Are you sure you want to change the base?
Conversation
This pull request was exported from Phabricator. Differential Revision: D67543330 |
✅ Deploy Preview for meta-velox canceled.
|
…or#11922) Summary: PrestoSerializer.cpp has grown into a roughly 5000 line behemoth. It makes navigating the file a challenge. This change is a pure refactor and does not introduce any changes besides moving things between files and renaming functions. It breaks the file up the code into 8 new files based on function: * PrestoIterativeVectorSerializer: contains the PrestoIterativeVectorSerializer class * PrestoBatchVectorSerializer: contains the PrestoBatchVectorSerializer class * PrestoHeader: contains the PrestoHeader class which is used for reading/parsing the header of a PrestoPage during deserialization * VectorStream: contains the VectorStream class which is an appendable container for serialized values used during serialization * PrestoVectorLexer: contains the PrestoVectorLexer class along with Token and TokenType, this is used to lex serialized PrestoPages for the benefit of compression libraries like Zstrong. * PrestoSerializerDeserializationUtils: contains the logic needed to deserialize a PrestoPage, notably the function readTopColumns which serves as the entry to deserialization * PrestoSerializerEstimationUtils: contains the logic needed to estimate the size of a serialized PrestoPage, this logic is shared by PrestoBatchVectorSerializer and PrestoVectorSerde's estimateSerializedSize function (used with PrestoIterativeVectorSerializer) * PrestoSerializerSerializationUtils: contains the generic logic needed to serialize a PrestoPage, notably the function serializeColumn which serves as the entry point to serialization and the function flushStreams used write the final output to an OutputStream. This logic is shared by PrestoBatchVectorSerializer, PrestoIterativeVectorSerializer, and PrestoVectorSerde's deserializeSingleColumn function. These are all internal details of the PrestoSerializer (which is why they were in the cpp file) so I've placed all the moved logic in a "detail" namespace (with the exception of Token and TokenType in PrestoVectorLexer). I've verified that all tests pass and run the benchmark to verify I didn't introduce any regressions. Differential Revision: D67543330
b9cf1ae
to
8a02235
Compare
…or#11922) Summary: PrestoSerializer.cpp has grown into a roughly 5000 line behemoth. It makes navigating the file a challenge. This change is a pure refactor and does not introduce any changes besides moving things between files and renaming functions. It breaks the file up the code into 8 new files based on function: * PrestoIterativeVectorSerializer: contains the PrestoIterativeVectorSerializer class * PrestoBatchVectorSerializer: contains the PrestoBatchVectorSerializer class * PrestoHeader: contains the PrestoHeader class which is used for reading/parsing the header of a PrestoPage during deserialization * VectorStream: contains the VectorStream class which is an appendable container for serialized values used during serialization * PrestoVectorLexer: contains the PrestoVectorLexer class along with Token and TokenType, this is used to lex serialized PrestoPages for the benefit of compression libraries like Zstrong. * PrestoSerializerDeserializationUtils: contains the logic needed to deserialize a PrestoPage, notably the function readTopColumns which serves as the entry to deserialization * PrestoSerializerEstimationUtils: contains the logic needed to estimate the size of a serialized PrestoPage, this logic is shared by PrestoBatchVectorSerializer and PrestoVectorSerde's estimateSerializedSize function (used with PrestoIterativeVectorSerializer) * PrestoSerializerSerializationUtils: contains the generic logic needed to serialize a PrestoPage, notably the function serializeColumn which serves as the entry point to serialization and the function flushStreams used write the final output to an OutputStream. This logic is shared by PrestoBatchVectorSerializer, PrestoIterativeVectorSerializer, and PrestoVectorSerde's deserializeSingleColumn function. These are all internal details of the PrestoSerializer (which is why they were in the cpp file) so I've placed all the moved logic in a "detail" namespace (with the exception of Token and TokenType in PrestoVectorLexer). I've verified that all tests pass and run the benchmark to verify I didn't introduce any regressions. Differential Revision: D67543330
8a02235
to
d4c1692
Compare
This pull request was exported from Phabricator. Differential Revision: D67543330 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D67543330 |
d4c1692
to
df5a504
Compare
…or#11922) Summary: PrestoSerializer.cpp has grown into a roughly 5000 line behemoth. It makes navigating the file a challenge. This change is a pure refactor and does not introduce any changes besides moving things between files and renaming functions. It breaks the file up the code into 8 new files based on function: * PrestoIterativeVectorSerializer: contains the PrestoIterativeVectorSerializer class * PrestoBatchVectorSerializer: contains the PrestoBatchVectorSerializer class * PrestoHeader: contains the PrestoHeader class which is used for reading/parsing the header of a PrestoPage during deserialization * VectorStream: contains the VectorStream class which is an appendable container for serialized values used during serialization * PrestoVectorLexer: contains the PrestoVectorLexer class along with Token and TokenType, this is used to lex serialized PrestoPages for the benefit of compression libraries like Zstrong. * PrestoSerializerDeserializationUtils: contains the logic needed to deserialize a PrestoPage, notably the function readTopColumns which serves as the entry to deserialization * PrestoSerializerEstimationUtils: contains the logic needed to estimate the size of a serialized PrestoPage, this logic is shared by PrestoBatchVectorSerializer and PrestoVectorSerde's estimateSerializedSize function (used with PrestoIterativeVectorSerializer) * PrestoSerializerSerializationUtils: contains the generic logic needed to serialize a PrestoPage, notably the function serializeColumn which serves as the entry point to serialization and the function flushStreams used write the final output to an OutputStream. This logic is shared by PrestoBatchVectorSerializer, PrestoIterativeVectorSerializer, and PrestoVectorSerde's deserializeSingleColumn function. These are all internal details of the PrestoSerializer (which is why they were in the cpp file) so I've placed all the moved logic in a "detail" namespace (with the exception of Token and TokenType in PrestoVectorLexer). I've verified that all tests pass and run the benchmark to verify I didn't introduce any regressions. Differential Revision: D67543330
This pull request was exported from Phabricator. Differential Revision: D67543330 |
…or#11922) Summary: PrestoSerializer.cpp has grown into a roughly 5000 line behemoth. It makes navigating the file a challenge. This change is a pure refactor and does not introduce any changes besides moving things between files and renaming functions. It breaks the file up the code into 8 new files based on function: * PrestoIterativeVectorSerializer: contains the PrestoIterativeVectorSerializer class * PrestoBatchVectorSerializer: contains the PrestoBatchVectorSerializer class * PrestoHeader: contains the PrestoHeader class which is used for reading/parsing the header of a PrestoPage during deserialization * VectorStream: contains the VectorStream class which is an appendable container for serialized values used during serialization * PrestoVectorLexer: contains the PrestoVectorLexer class along with Token and TokenType, this is used to lex serialized PrestoPages for the benefit of compression libraries like Zstrong. * PrestoSerializerDeserializationUtils: contains the logic needed to deserialize a PrestoPage, notably the function readTopColumns which serves as the entry to deserialization * PrestoSerializerEstimationUtils: contains the logic needed to estimate the size of a serialized PrestoPage, this logic is shared by PrestoBatchVectorSerializer and PrestoVectorSerde's estimateSerializedSize function (used with PrestoIterativeVectorSerializer) * PrestoSerializerSerializationUtils: contains the generic logic needed to serialize a PrestoPage, notably the function serializeColumn which serves as the entry point to serialization and the function flushStreams used write the final output to an OutputStream. This logic is shared by PrestoBatchVectorSerializer, PrestoIterativeVectorSerializer, and PrestoVectorSerde's deserializeSingleColumn function. These are all internal details of the PrestoSerializer (which is why they were in the cpp file) so I've placed all the moved logic in a "detail" namespace (with the exception of Token and TokenType in PrestoVectorLexer). I've verified that all tests pass and run the benchmark to verify I didn't introduce any regressions. Differential Revision: D67543330
df5a504
to
a771dfd
Compare
This pull request was exported from Phabricator. Differential Revision: D67543330 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this will also help with improving incremental compile when working on these!
…or#11922) Summary: PrestoSerializer.cpp has grown into a roughly 5000 line behemoth. It makes navigating the file a challenge. This change is a pure refactor and does not introduce any changes besides moving things between files and renaming functions. It breaks the file up the code into 8 new files based on function: * PrestoIterativeVectorSerializer: contains the PrestoIterativeVectorSerializer class * PrestoBatchVectorSerializer: contains the PrestoBatchVectorSerializer class * PrestoHeader: contains the PrestoHeader class which is used for reading/parsing the header of a PrestoPage during deserialization * VectorStream: contains the VectorStream class which is an appendable container for serialized values used during serialization * PrestoVectorLexer: contains the PrestoVectorLexer class along with Token and TokenType, this is used to lex serialized PrestoPages for the benefit of compression libraries like Zstrong. * PrestoSerializerDeserializationUtils: contains the logic needed to deserialize a PrestoPage, notably the function readTopColumns which serves as the entry to deserialization * PrestoSerializerEstimationUtils: contains the logic needed to estimate the size of a serialized PrestoPage, this logic is shared by PrestoBatchVectorSerializer and PrestoVectorSerde's estimateSerializedSize function (used with PrestoIterativeVectorSerializer) * PrestoSerializerSerializationUtils: contains the generic logic needed to serialize a PrestoPage, notably the function serializeColumn which serves as the entry point to serialization and the function flushStreams used write the final output to an OutputStream. This logic is shared by PrestoBatchVectorSerializer, PrestoIterativeVectorSerializer, and PrestoVectorSerde's deserializeSingleColumn function. These are all internal details of the PrestoSerializer (which is why they were in the cpp file) so I've placed all the moved logic in a "detail" namespace (with the exception of Token and TokenType in PrestoVectorLexer). I've verified that all tests pass and run the benchmark to verify I didn't introduce any regressions. Differential Revision: D67543330
…or#11922) Summary: PrestoSerializer.cpp has grown into a roughly 5000 line behemoth. It makes navigating the file a challenge. This change is a pure refactor and does not introduce any changes besides moving things between files and renaming functions. It breaks the file up the code into 8 new files based on function: * PrestoIterativeVectorSerializer: contains the PrestoIterativeVectorSerializer class * PrestoBatchVectorSerializer: contains the PrestoBatchVectorSerializer class * PrestoHeader: contains the PrestoHeader class which is used for reading/parsing the header of a PrestoPage during deserialization * VectorStream: contains the VectorStream class which is an appendable container for serialized values used during serialization * PrestoVectorLexer: contains the PrestoVectorLexer class along with Token and TokenType, this is used to lex serialized PrestoPages for the benefit of compression libraries like Zstrong. * PrestoSerializerDeserializationUtils: contains the logic needed to deserialize a PrestoPage, notably the function readTopColumns which serves as the entry to deserialization * PrestoSerializerEstimationUtils: contains the logic needed to estimate the size of a serialized PrestoPage, this logic is shared by PrestoBatchVectorSerializer and PrestoVectorSerde's estimateSerializedSize function (used with PrestoIterativeVectorSerializer) * PrestoSerializerSerializationUtils: contains the generic logic needed to serialize a PrestoPage, notably the function serializeColumn which serves as the entry point to serialization and the function flushStreams used write the final output to an OutputStream. This logic is shared by PrestoBatchVectorSerializer, PrestoIterativeVectorSerializer, and PrestoVectorSerde's deserializeSingleColumn function. These are all internal details of the PrestoSerializer (which is why they were in the cpp file) so I've placed all the moved logic in a "detail" namespace (with the exception of Token and TokenType in PrestoVectorLexer). I've verified that all tests pass and run the benchmark to verify I didn't introduce any regressions. Differential Revision: D67543330
…or#11922) Summary: PrestoSerializer.cpp has grown into a roughly 5000 line behemoth. It makes navigating the file a challenge. This change is a pure refactor and does not introduce any changes besides moving things between files and renaming functions. It breaks the file up the code into 8 new files based on function: * PrestoIterativeVectorSerializer: contains the PrestoIterativeVectorSerializer class * PrestoBatchVectorSerializer: contains the PrestoBatchVectorSerializer class * PrestoHeader: contains the PrestoHeader class which is used for reading/parsing the header of a PrestoPage during deserialization * VectorStream: contains the VectorStream class which is an appendable container for serialized values used during serialization * PrestoVectorLexer: contains the PrestoVectorLexer class along with Token and TokenType, this is used to lex serialized PrestoPages for the benefit of compression libraries like Zstrong. * PrestoSerializerDeserializationUtils: contains the logic needed to deserialize a PrestoPage, notably the function readTopColumns which serves as the entry to deserialization * PrestoSerializerEstimationUtils: contains the logic needed to estimate the size of a serialized PrestoPage, this logic is shared by PrestoBatchVectorSerializer and PrestoVectorSerde's estimateSerializedSize function (used with PrestoIterativeVectorSerializer) * PrestoSerializerSerializationUtils: contains the generic logic needed to serialize a PrestoPage, notably the function serializeColumn which serves as the entry point to serialization and the function flushStreams used write the final output to an OutputStream. This logic is shared by PrestoBatchVectorSerializer, PrestoIterativeVectorSerializer, and PrestoVectorSerde's deserializeSingleColumn function. These are all internal details of the PrestoSerializer (which is why they were in the cpp file) so I've placed all the moved logic in a "detail" namespace (with the exception of Token and TokenType in PrestoVectorLexer). I've verified that all tests pass and run the benchmark to verify I didn't introduce any regressions. Differential Revision: D67543330
…or#11922) Summary: PrestoSerializer.cpp has grown into a roughly 5000 line behemoth. It makes navigating the file a challenge. This change is a pure refactor and does not introduce any changes besides moving things between files and renaming functions. It breaks the file up the code into 8 new files based on function: * PrestoIterativeVectorSerializer: contains the PrestoIterativeVectorSerializer class * PrestoBatchVectorSerializer: contains the PrestoBatchVectorSerializer class * PrestoHeader: contains the PrestoHeader class which is used for reading/parsing the header of a PrestoPage during deserialization * VectorStream: contains the VectorStream class which is an appendable container for serialized values used during serialization * PrestoVectorLexer: contains the PrestoVectorLexer class along with Token and TokenType, this is used to lex serialized PrestoPages for the benefit of compression libraries like Zstrong. * PrestoSerializerDeserializationUtils: contains the logic needed to deserialize a PrestoPage, notably the function readTopColumns which serves as the entry to deserialization * PrestoSerializerEstimationUtils: contains the logic needed to estimate the size of a serialized PrestoPage, this logic is shared by PrestoBatchVectorSerializer and PrestoVectorSerde's estimateSerializedSize function (used with PrestoIterativeVectorSerializer) * PrestoSerializerSerializationUtils: contains the generic logic needed to serialize a PrestoPage, notably the function serializeColumn which serves as the entry point to serialization and the function flushStreams used write the final output to an OutputStream. This logic is shared by PrestoBatchVectorSerializer, PrestoIterativeVectorSerializer, and PrestoVectorSerde's deserializeSingleColumn function. These are all internal details of the PrestoSerializer (which is why they were in the cpp file) so I've placed all the moved logic in a "detail" namespace (with the exception of Token and TokenType in PrestoVectorLexer). I've verified that all tests pass and run the benchmark to verify I didn't introduce any regressions. Differential Revision: D67543330
a771dfd
to
8807030
Compare
This pull request was exported from Phabricator. Differential Revision: D67543330 |
…or#11922) Summary: PrestoSerializer.cpp has grown into a roughly 5000 line behemoth. It makes navigating the file a challenge. This change is a pure refactor and does not introduce any changes besides moving things between files and renaming functions. It breaks the file up the code into 8 new files based on function: * PrestoIterativeVectorSerializer: contains the PrestoIterativeVectorSerializer class * PrestoBatchVectorSerializer: contains the PrestoBatchVectorSerializer class * PrestoHeader: contains the PrestoHeader class which is used for reading/parsing the header of a PrestoPage during deserialization * VectorStream: contains the VectorStream class which is an appendable container for serialized values used during serialization * PrestoVectorLexer: contains the PrestoVectorLexer class along with Token and TokenType, this is used to lex serialized PrestoPages for the benefit of compression libraries like Zstrong. * PrestoSerializerDeserializationUtils: contains the logic needed to deserialize a PrestoPage, notably the function readTopColumns which serves as the entry to deserialization * PrestoSerializerEstimationUtils: contains the logic needed to estimate the size of a serialized PrestoPage, this logic is shared by PrestoBatchVectorSerializer and PrestoVectorSerde's estimateSerializedSize function (used with PrestoIterativeVectorSerializer) * PrestoSerializerSerializationUtils: contains the generic logic needed to serialize a PrestoPage, notably the function serializeColumn which serves as the entry point to serialization and the function flushStreams used write the final output to an OutputStream. This logic is shared by PrestoBatchVectorSerializer, PrestoIterativeVectorSerializer, and PrestoVectorSerde's deserializeSingleColumn function. These are all internal details of the PrestoSerializer (which is why they were in the cpp file) so I've placed all the moved logic in a "detail" namespace (with the exception of Token and TokenType in PrestoVectorLexer). I've verified that all tests pass and run the benchmark to verify I didn't introduce any regressions. Differential Revision: D67543330
Summary:
PrestoSerializer.cpp has grown into a roughly 5000 line behemoth. It makes navigating the file a challenge.
This change is a pure refactor and does not introduce any changes besides moving things between files and renaming functions. It breaks the file up the code into 8 new files based on function:
during deserialization
during serialization
serialized PrestoPages for the benefit of compression libraries like Zstrong.
function readTopColumns which serves as the entry to deserialization
logic is shared by PrestoBatchVectorSerializer and PrestoVectorSerde's estimateSerializedSize function (used
with PrestoIterativeVectorSerializer)
function serializeColumn which serves as the entry point to serialization and the function flushStreams used
to write the final output to an OutputStream. This logic is shared by PrestoBatchVectorSerializer,
PrestoIterativeVectorSerializer, and PrestoVectorSerde's deserializeSingleColumn function.
These are all internal details of the PrestoSerializer (which is why they were in the cpp file) so I've placed all the
moved logic in a "detail" namespace (with the exception of Token and TokenType in PrestoVectorLexer).
I've verified that all tests pass and run the benchmark to verify I didn't introduce any regressions.
Differential Revision: D67543330