You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "JazJaz426 (via GitHub)" <gi...@apache.org> on 2024/12/05 00:07:03 UTC
[I] Column with over 2GB size limit but still identified as String in schema [arrow]
JazJaz426 opened a new issue, #44944:
URL: https://github.com/apache/arrow/issues/44944
### Describe the usage question you have. Please include as many useful details as possible.
Hi folks,
I read online that in PyArrow a string column would have a column-level size limit of 2GB. However, in my work I noticed this doesn't hold.
```
def some_function(
self, raw_table: pa.Table,
):
schema = raw_table.schema
df = pl.DataFrame(raw_table)
```
In the code above, the table `raw_table` has some `document` column with size over 2GB and I used `sum(buf.size if buf is not None else 0 for buf in arrow_array.buffers()` for size checking. But when I check the schema it says that column is String type.
I later cast it to polar then cast back to arrow, which automatically turns all string to large string due to polar's default setting. Trying to cast the `document` column back to string type but it got casting error and it always stop at some fixed number of rows. I calculated the size processed and its roughly 2GB.
So considering both cases, pretty sure the column is def over 2GB and there's no calculation error in the first place. However super curious why it's showing string type in the first place? Is there's something subtle I'm not aware of?
### Component(s)
Python
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Python] Column with over 2GB size limit but still identified as String in schema [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #44944:
URL: https://github.com/apache/arrow/issues/44944#issuecomment-3926630217
This issue has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this issue will be closed in 14 days. If this usage question has evolved into a feature request or docs update, please remove the 'Type: usage' label and add the 'Type: enhancement' label instead.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Column with over 2GB size limit but still identified as String in schema [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #44944:
URL: https://github.com/apache/arrow/issues/44944#issuecomment-2518809918
So the 2GB limit is on a single Array, but the columns of a Table are not Arrays. Instead they're ChunkedArrays which you can think of as a list of Arrays. Each individual chunk in a ChunkedArray has the 2GB limit, but the total of the ChunkedArray can surpass that limit.
It's possible Polars converted to LargeString and combined the chunks into a single array, which then on the Python side can't be casted back into a String anymore.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Python] Column with over 2GB size limit but still identified as String in schema [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm closed issue #44944: [Python] Column with over 2GB size limit but still identified as String in schema
URL: https://github.com/apache/arrow/issues/44944
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Column with over 2GB size limit but still identified as String in schema [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #44944:
URL: https://github.com/apache/arrow/issues/44944#issuecomment-2518811196
More info:
https://arrow.apache.org/docs/format/Glossary.html#term-chunked-array
https://stackoverflow.com/questions/71428738/is-it-possible-to-append-rows-to-an-existing-arrow-pyarrow-table/71429073#71429073
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Column with over 2GB size limit but still identified as String in schema [arrow]
Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #44944:
URL: https://github.com/apache/arrow/issues/44944#issuecomment-2518909068
@JazJaz426 I see you reacted to the posts, does this answer your question?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org