You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Weston Pace (Jira)" <ji...@apache.org> on 2021/06/30 21:25:00 UTC

[jira] [Commented] (ARROW-11378) [C++][Dataset] Writing partitions with timestamp type give mis-formatted (integers) directory names

    [ https://issues.apache.org/jira/browse/ARROW-11378?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17372203#comment-17372203 ] 

Weston Pace commented on ARROW-11378:
-------------------------------------

So it seems that : is indeed an invalid character in Windows filesystems (NTFS, FAT).  Rather than introduce a bunch of %3A my preference would be to use strings like 20210630T204219Z which are valid ISO-8601 strings.

I wonder if I need to introduce an option for Spark compatibility.

Also, just checking my logic:
 * If the timestamp column is timezone=None then assume it is a local date time and just convert to UTC ISO-8601
 * If the timestamp column is timezone=UTC then same as above.
 * If the timestamp column is timezone=Other then it is a bit trickier.  My preference would be to just return invalid in this case.  Otherwise I don't think we can retain the timezone string through a roundtrip without breaking ISO-8601 compatibility.

 

> [C++][Dataset] Writing partitions with timestamp type give mis-formatted (integers) directory names
> ---------------------------------------------------------------------------------------------------
>
>                 Key: ARROW-11378
>                 URL: https://issues.apache.org/jira/browse/ARROW-11378
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>            Reporter: Joris Van den Bossche
>            Assignee: Weston Pace
>            Priority: Major
>              Labels: dataset
>             Fix For: 5.0.0
>
>
> {code}
> In [1]: df = pd.DataFrame({"dates": list(pd.date_range("2012-01-01", periods=2, freq="D")) * 5, "col": range(10)})
> In [2]: table = pa.table(df)
> In [8]: part = ds.partitioning(table.select(["dates"]).schema, flavor="hive")
> In [9]: ds.write_dataset(table, "test_partition_timestamp", format="parquet", partitioning=part)
> In [10]: !ls test_partition_timestamp/
> 'dates=1325376000000000000'  'dates=1325462400000000000'
> {code}
> Same happens for non-ns timestamp types.
> (didn't directly find an existing issue about it)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)