bmschmidt opened a new issue, #37401:
URL: https://github.com/apache/arrow/issues/37401

   ### Describe the usage question you have. Please include as many useful 
details as  possible.
   
   
   In the javascript package, how could one deserialize an Arrow schema from 
raw bytes?
   
   In pyarrow, for example, I can do this:
   
   ```python
   import pyarrow as pa
   import io
   import base64
   
   
pa.ipc.read_schema(io.BytesIO(base64.b64decode(b'/////3AAAAAQAAAAAAAKAAwABgAFAAgACgAAAAABBAAMAAAACAAIAAAABAAIAAAABAAAAAEAAAAUAAAAEAAUAAgABgAHAAwAAAAQABAAAAAAAAEDEAAAABgAAAAEAAAAAAAAAAEAAAB4AAYACAAGAAYAAAAAAAEA')))
   ```
   
   But I'm struggling to find any way to do the equivalent in javascript, even 
after reading the code a bit.
   The below (and various permutations involving ArrayBuffers, ByteBuffer 
objects in flatbuffers, etc.) all fail.
   
   ```javascript
     import { Message, Schema, tableFromIPC } from 'apache-arrow'
     const sch = 
`/////3AAAAAQAAAAAAAKAAwABgAFAAgACgAAAAABBAAMAAAACAAIAAAABAAIAAAABAAAAAEAAAAUAAAAEAAUAAgABgAHAAwAAAAQABAAAAAAAAEDEAAAABgAAAAEAAAAAAAAAAEAAAB4AAYACAAGAAYAAAAAAAEA`
     const decoded = atob(sch);
     const bytes = Uint8Array.from(decoded, c => c.charCodeAt(0))
     console.log(Schema.decode(bytes))
   ```
   
   I can deserialize a full table with tableFromIPC, but there are times that I 
would like to work with a schema without any attached data.
   
   Thanks for any help!
   
   ### Component(s)
   
   JavaScript


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to