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

Node register arrow ipc buffer fix #5433

Merged

Conversation

samansmink
Copy link
Contributor

Switch from using the replacement scans to tmp views for registering arrow ipc buffers.

tools/nodejs/src/connection.cpp Show resolved Hide resolved
tools/nodejs/src/connection.cpp Outdated Show resolved Hide resolved
tools/nodejs/src/connection.cpp Outdated Show resolved Hide resolved
auto raw_ptr = reinterpret_cast<uint64_t>(arr.ArrayBuffer().Data());
auto length = (uint64_t)arr.ElementLength();

arrow_scan_function += "{'ptr': " + std::to_string(raw_ptr) + ", 'size': " + std::to_string(length) + "},";
Copy link
Member

Choose a reason for hiding this comment

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

I would recommend to use the relational api for this, e.g.

		conn->conn->TableFunction("r_dataframe_scan", {Value::POINTER((uintptr_t)value.data())}, parameter_map)
		    ->CreateView(name, overwrite, true);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will rewrite this in next pr, can merge for now so we get this working again 👍

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.

None yet

4 participants