timspro opened a new issue, #50:
URL: https://github.com/apache/arrow-js/issues/50

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   When using `tableFromArrays()`, I'm seeing the error "Unable to infer Vector 
type from input values, explicit type declaration expected." for the following 
code:
   
   ```js
     const data = {
       word: [["a"], ["b"]],
     }
     const table = tableFromArrays(data)
   ```
     
   For some reason, `tableFromArrays()` infers the type of each string as a 
dictionary. Then it compares the IDs of the two dictionaries which are not the 
same: 
https://github.com/apache/arrow/blob/main/js/src/visitor/typecomparator.ts#L199.
   
   A more complex example that also produces the error:
   ```js
     const data = {
       customers: [{names: ["joe"]}, {names: ["bob"]}],
     }
     const table = tableFromArrays(data)
   ```
     
   I would prefer not having the type inferred at all and instead explicitly 
passing a schema or field type as an argument, but I can't seem to find any 
documentation on how to do that.  
   
   ### 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: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to