You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "domoritz (via GitHub)" <gi...@apache.org> on 2024/01/05 14:46:51 UTC

Re: [I] [JS] Setting value of row in table with strings truncates longer strings [arrow]

domoritz commented on issue #36395:
URL: https://github.com/apache/arrow/issues/36395#issuecomment-1878792836

   This is a bit surprising but also expected. The memory for the variable width strings is allocated in one block so writing different content in that memory with `set` will not work correctly. In general, Arrow data structures are optimized for reading and if you need to make changes, you are better off making a new data structure. Supporting write here would mean we need to move all the memory for the strings in the vector around. 
   
   If you only have a limited number of strings, you can use a dictionary and then re-assigning a value should work. 
   
   Closing as working as expected for now. 


-- 
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