feefladder commented on issue #31458:
URL: https://github.com/apache/arrow/issues/31458#issuecomment-1488780632
Ok, I think this is also quite a basic question I have that could use some
documentation:
I have a table with a schema, say
```
import {makeTable} from "apache-arrow"
const table = makeTable({
name: ["Alice", "Bob"],
otherColumn: [1, 2]
})
```
Now, I want to generate a new table, based on some kind of function, like:
```
function isBob(name: string): boolean{
return name === "Bob"
}
```
which would give the table
```
const table = makeTable({
name: [false, true]
otherColumn: [1, 2]
})
```
How would I do this? (there is a schema change, UTF-8 => boolean), so do I
then define a schema? convert the table to arrays, then change the array, then
go back to array? Can I create a table like:
```
Table( new Schema([new Field("name", Bool), table.schema.otherColumn],
table.getChild("otherColumn"))
```
where the "name" is initialize to `null`, or otherwise, I could also create
a vector?
--
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]