这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@bgivertz
Copy link
Collaborator

No description provided.

@bgivertz bgivertz marked this pull request as ready for review April 27, 2022 17:02
using namespace std;

auto& context = env().getContext();
FunctionType* read_block_type = FunctionType::get(env().i64Type(), {env().i8ptrType(),
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for the argnames

Copy link
Contributor

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();
Copy link
Contributor

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.

Copy link
Contributor

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...

Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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?

Copy link
Contributor

@LeonhardFS LeonhardFS left a 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();
Copy link
Contributor

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...

@LeonhardFS
Copy link
Contributor

lgtm once CI passes

@LeonhardFS LeonhardFS merged commit 7848a80 into tuplex:master May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants