[
https://issues.apache.org/jira/browse/ARROW-10695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17320136#comment-17320136
]
Joris Van den Bossche commented on ARROW-10695:
-----------------------------------------------
> Side note: perhaps we could still implement an option to raise an error
> instead of overwriting existing files.
Indeed, I was just writing a new JIRA for that:
https://issues.apache.org/jira/browse/ARROW-12358
> I think this should definitely be the responsibility of the user. This means
> the user chooses whichever random generation scheme they prefer. Some users
> may prefer to use a timestamp, etc.
I am personally certainly fine with leaving it to the user (in the end, it's
quite straightforward with the filename template, and indeed the user can put
anything they want in it).
I think possible reasons to potentially special case uuid is because that's 1)
what we actually used before, and 2) it's what (I think) spark does.
> [C++][Dataset] Allow to use a UUID in the basename_template when writing a
> dataset
> ----------------------------------------------------------------------------------
>
> Key: ARROW-10695
> URL: https://issues.apache.org/jira/browse/ARROW-10695
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Joris Van den Bossche
> Priority: Minor
> Labels: dataset, dataset-parquet-write
> Fix For: 5.0.0
>
>
> Currently we allow the user to specify a {{basename_template}}, and this can
> include a {{"\{i\}"}} part to replace it with an automatically incremented
> integer (so each generated file written to a single partition is unique):
> https://github.com/apache/arrow/blob/master/python/pyarrow/dataset.py#L713-L717
> It _might_ be useful to also have the ability to use a UUID, to ensure the
> file is unique in general (not only for a single write) and to mimic the
> behaviour of the old {{write_to_dataset}} implementation.
> For example, we could look for a {{"\{uuid\}"}} in the template string, and
> if present replace it for each file with a new UUID.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)