Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Possible pluggable C extension for performance#1066

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
kesmit13 wants to merge15 commits intoPyMySQL:main
base:main
Choose a base branch
Loading
fromsinglestore-labs:main
Draft
Changes from1 commit
Commits
Show all changes
15 commits
Select commitHold shift + click to select a range
1d2021f
Add accelerator
kesmit13Aug 24, 2022
655e858
Remove extra file
kesmit13Aug 24, 2022
37b003d
Continuing unbuffered refactoring
kesmit13Aug 26, 2022
622396f
Small cleanup of df buffer and output object
kesmit13Aug 26, 2022
5d6ff13
Fix issues with numpy / dataframe memory
kesmit13Aug 30, 2022
5827589
Doc cleanup and new license
kesmit13Aug 30, 2022
0b8bb34
Merge branch 'PyMySQL:main' into main
kesmit13Aug 30, 2022
76d6767
Add mysql exception to connection
kesmit13Aug 30, 2022
d56ad06
Merge branch 'main' of github.com:singlestore-labs/PyMySQLsv
kesmit13Aug 30, 2022
7b22cd6
More performance improvements
kesmit13Sep 1, 2022
ea0ae59
Remove numpy support for now; clean up API
kesmit13Sep 1, 2022
8e0fdd9
Fix formatting
kesmit13Sep 1, 2022
e134133
Make invalid value replacements more generic
kesmit13Sep 1, 2022
3b97395
Merge branch 'PyMySQL:main' into main
kesmit13Nov 17, 2022
14c993c
Update README.md
kesmit13Jan 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Small cleanup of df buffer and output object
  • Loading branch information
@kesmit13
kesmit13 committedAug 26, 2022
commit622396fc0dda85b6943d42987b3a9a47ce4d5eb6
20 changes: 6 additions & 14 deletionssrc/accel.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2059,13 +2059,13 @@ static PyObject *read_rowdata_packet(PyObject *self, PyObject *args, PyObject *k
Py_XDECREF(py_n_rows);
}
else {
// Unbuffered needs a new row every time.
py_state->df_buffer = malloc(py_state->df_buffer_row_size);
py_state->df_cursor = py_state->df_buffer;

switch (py_state->options.output_type) {
case MYSQL_ACCEL_OUT_PANDAS:
case MYSQL_ACCEL_OUT_NUMPY:
// Unbuffered needs a new row every time.
py_state->df_buffer = malloc(py_state->df_buffer_row_size);
py_state->df_cursor = py_state->df_buffer;

// TODO: reshape?
py_out = py_state->py_rows;
Py_INCREF(py_out);
Expand All@@ -2077,16 +2077,8 @@ static PyObject *read_rowdata_packet(PyObject *self, PyObject *args, PyObject *k
}
}
else {
switch (py_state->options.output_type) {
case MYSQL_ACCEL_OUT_PANDAS:
case MYSQL_ACCEL_OUT_NUMPY:
py_out = py_state->py_rows;
Py_INCREF(py_out);
break;
default:
py_out = py_state->py_rows;
Py_INCREF(py_out);
}
py_out = py_state->py_rows;
Py_INCREF(py_out);
PyObject *py_n_rows = PyLong_FromSsize_t(py_state->n_rows);
PyObject_SetAttrString(py_res, "affected_rows", (py_n_rows) ? py_n_rows : Py_None);
Py_XDECREF(py_n_rows);
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp