You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "anjakefala (via GitHub)" <gi...@apache.org> on 2023/05/31 22:06:54 UTC
[GitHub] [arrow] anjakefala commented on pull request #35860: GH-35730: [C++] Add the ability to specify custom schema on a dataset write
anjakefala commented on PR #35860:
URL: https://github.com/apache/arrow/pull/35860#issuecomment-1571027387
So far, I added 2 basic tests, based on my understanding of the feature!
The basic case where you write a single table, which contains a field with nullability specified, passes.
Note that this one:
```
# we can specify the nullability of a field through the schema
pa.dataset.write_dataset(table_no_null, tempdir/"nulltest2", schema=schema_nullable)
dataset = ds.dataset(tempdir/"nulltest2", format="parquet")
assert dataset.to_table().schema.equals(schema_nullable)
```
is failing for now. I did not specify nullability in the table's schema, but then specified it in `write_dataset(schema=)`.
Is it expected that the returned dataset would have a field with nullability?
In this example `table` has a field specified with nullability, while `table_no_null` does not:
```
pa.dataset.write_dataset([table_no_null, table], tempdir/"nulltest2", schema=schema_nullable)
```
The resulting schema also does not have nullability.
--
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