Skip to content
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

[WIP] Add Support for Functions Returning datetime Objects #46

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MarkRoddy
Copy link
Owner

Note this is not presently working. There is an issue causing a segfault which is proving difficult to track down as it is occurring in a segment of code not affected by this change, implying it's a memory corruption issue say, rather than something easier to track down like a null pointer passed into a CPython function. Stacktrace below for reference:

    #0 0x7f1ac360e95f  (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x25a95f)
    #1 0x7f1ac35e780a in PyUnicode_New (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x23380a)
    #2 0x7f1ac35bb7f0 in _PyUnicodeWriter_PrepareInternal (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x2077f0)
    #3 0x7f1ac35e02df in PyUnicode_DecodeUTF8Stateful (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x22c2df)
    #4 0x7f1ac35e682c in PyUnicode_FromFormatV (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x23282c)
    #5 0x7f1ac3567afb in PyErr_Format (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x1b3afb)
    #6 0x7f1ac36126a2 in _PyObject_GenericGetAttrWithDict (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x25e6a2)
    #7 0x7f1ac36130c9 in _PyModuleSpec_IsInitializing (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x25f0c9)
    #8 0x7f1ac343ca78 in PyImport_ImportModuleLevelObject (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x88a78)
    #9 0x7f1ac3559b0c in PyImport_ImportModuleLevel (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x1a5b0c)
    #10 0x7f1ac3559cf4 in PyImport_Import (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x1a5cf4)
    #11 0x7f1ac3559dfd in PyImport_ImportModule (/lib/x86_64-linux-gnu/libpython3.8.so.1.0+0x1a5dfd)
    #12 0x7f1ad8c6c5ab in pyudf::PythonFunction::init(std::__cxx11::basic_string<char, std::char_traits<char>, std::a\
llocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /hom\
e/mark/development/duckdb-python-udf/src/python_function.cpp:28
    #13 0x7f1ad8c6c03b in pyudf::PythonFunction::PythonFunction(std::__cxx11::basic_string<char, std::char_traits<cha\
r>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > co\
nst&) /home/mark/development/duckdb-python-udf/src/python_function.cpp:19
    #14 0x7f1ad8c6f683 in pyudf::PythonTableFunction::PythonTableFunction(std::__cxx11::basic_string<char, std::char_\
traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<\
char> > const&) /home/mark/development/duckdb-python-udf/src/python_table_function.cpp:22

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.

1 participant