blazingsql
blazingsql copied to clipboard
pyblazing code refactoring
The code on the python side of BlazingSQL could use some refactoring and cleaning up. The following are some of the things that need to be improved:
context.py is too big context.py right now holds most of the code. The code here needs to be broken up unto more files and be better organized so that its not just one big god file. Public APIs should be in one file(s) while private methods in other files.
BlazingTable
The class BlazingTable
has a lot of problems. Right now it serves two purposes and therefore it should become two classes, each more tailored for their individual purpose.
- Its to hold the definition of a table in the BlazingContext,
- Its to hold a description of part of a table that is sent to each node of the engine for processing a query.
The constructors need to also be improved. In particular for the second purpose. Right now we use the constructor that exists, then add a whole bunch more members after the fact.
Ideally neither of those classes should actually be called
BlazingTable
since that name clashes with a class on the C++ side with the same name.
There are many ways that this code could be improved, @williamBlazing can help identify requirements and explain the existing code.