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

Conversation

@bgivertz
Copy link
Collaborator

@bgivertz bgivertz commented Dec 6, 2021

Fixes bug where non-conforming rows will crash Tuplex when the majority type is a simple tuple containing var length fields.

if (typeStr[j] == 's') {
auto tupleItem = PyTuple_GetItem(obj, j);
if (PyUnicode_Check(tupleItem)) {
requiredBytes += PyUnicode_GET_SIZE(PyTuple_GetItem(obj, j)) + 1; // +1 for '\0'
Copy link
Contributor

Choose a reason for hiding this comment

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

don't call PyTuple_GetItem here again, use the one from before and adjust refcount to be correct. https://docs.python.org/3.9/c-api/refcounting.html (check doc for PyTuple as well, maybe toy example to get correct refcount here :) )

@LeonhardFS LeonhardFS merged commit 5b6964b into tuplex:master Dec 7, 2021
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.

[BUG] Parallelize crashes when an exception row does not match normal case varlength schema

2 participants