-
Notifications
You must be signed in to change notification settings - Fork 47
Cached Exceptions #101
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
Cached Exceptions #101
Conversation
| using namespace std; | ||
|
|
||
| auto& context = env().getContext(); | ||
| FunctionType* read_block_type = FunctionType::get(env().i64Type(), {env().i8ptrType(), |
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.
let's maybe create a helper function next to where the func tyoe read_block_f is declared (CodegenHelper?) to create the type of the read_block_function.
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.
same for the argnames
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.
and some test that length of argnames matches the functype.
| for(auto obj : _py_objects) | ||
| Py_XINCREF(obj); | ||
| python::unlockGIL(); | ||
| _normalPartitions = cop->cachedNormalPartitions(); |
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.
hm maybe we should add a struct which contains all of these results... -> would make the code more readable.
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.
i.e., normalPartitions + generalPartitions + fallbackPartitions + partitionGroups. Maybe DatasetPartitions? or PartitionCollection? open for good name suggestions here...
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.
that struct/class should also contain counts etc.
| cachedPartitionsMemory += p->bytesWritten(); | ||
| totalCachedPartitionsMemory += p->size(); | ||
| pos++; | ||
| size_t normalBytesWritten = 0; |
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.
this here looks again quite repetitive, maybe we can structure it a bit more?
| // create new partition on driver | ||
| auto driver = _context->getDriver(); | ||
|
|
||
| std::vector<std::tuple<size_t, PyObject*>> fallbackRows; |
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.
some of this code here seems quite repetitive. Maybe restructure in functions/structs?
LeonhardFS
left a comment
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.
a couple minor things, great work here!
| uint8_t **fallbackPartitions = new uint8_t*[_fallbackPartitions.size()]; | ||
| for (int i = 0; i < _fallbackPartitions.size(); ++i) | ||
| fallbackPartitions[i] = _fallbackPartitions[i]->lockWriteRaw(); | ||
| int64_t numFallbackPartitions = _fallbackPartitions.size(); |
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.
size_t ? maybe also init then the vector of pointers with that var...
|
lgtm once CI passes |
No description provided.