You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Jorge (Jira)" <ji...@apache.org> on 2020/07/14 11:57:00 UTC
[jira] [Created] (ARROW-9461) [Rust] Reading Date32 and Date64
errors - they are incorrectly converted to RecordBatch
Jorge created ARROW-9461:
----------------------------
Summary: [Rust] Reading Date32 and Date64 errors - they are incorrectly converted to RecordBatch
Key: ARROW-9461
URL: https://issues.apache.org/jira/browse/ARROW-9461
Project: Apache Arrow
Issue Type: Bug
Components: Rust
Reporter: Jorge
Assignee: Jorge
Steps to reproduce:
1. Create a file `a.parquet` using the following code:
{code:python}
import pyarrow.parquet
import numpy
def _data_datetime(f):
data = numpy.array([
numpy.datetime64('2018-08-18 23:25'),
numpy.datetime64('2019-08-18 23:25'),
numpy.datetime64("NaT")
])
data = numpy.array(data, dtype=f'datetime64[{f}]')
return data
def _write_parquet(path, data):
table = pyarrow.Table.from_arrays([pyarrow.array(data)], names=['a'])
pyarrow.parquet.write_table(table, path)
return path
_write_parquet('a.parquet', _data_datetime('D'))
{code}
2. Write a small example to read it to RecordBatches
3. observe the error {{ArrowError(ParquetError("InvalidArgumentError(\"column types must match schema types, expected Date32(Day) but found UInt32 at column index 0\")"))}}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)