Uh oh!
There was an error while loading. Please reload this page.
ARROW-5494: [Python] Create FileSystem bindings - #5258
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Well, the functions which were inlined should be kept inline IMO.
There was a problem hiding this comment.
Then I need to move all of the implementation to the header, including the static functions (practically the whole implementation).
There was a problem hiding this comment.
If we keep everything as internal than that could work, although I prefer readable header files.
Actually we should benchmark whether it has a performance impact or not.
Could you recommend me specific benchmarks if we have any?
There was a problem hiding this comment.
We don't seem to have any datetime-heavy benchmarks in the ASV benchmarks directory.
However, you can probably devise a timeit-based microbenchmark easily. No need to be sophisticated :-)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
kszucs
commented
Sep 5, 2019
@wesm how can I properly set the visibility for https://github.com/apache/arrow/pull/5258/files#diff-6de8e16eea663cbb2694f9e66e71bd75R55 ? |
wesm
commented
Sep 5, 2019
@kszucs it's a typedef... visibility only has to do with exported compiled symbols |
kszucs
commented
Sep 6, 2019
Ahh, indeed! Thanks! |
@pitrou I have a "not a subpath error" which is probably windows related? https://ci.appveyor.com/project/ApacheSoftwareFoundation/arrow/builds/27224120/job/dx9qmxdj5tnenu94#L2057 |
pitrou
commented
Sep 9, 2019
Right now the filesystem classes expect forward slashes, and it seems you're passing backslashes. You should try |
pitrou
left a comment
There was a problem hiding this comment.
Thanks for doing this. It's gonna be very useful. I posted some comments below.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
We don't seem to have any datetime-heavy benchmarks in the ASV benchmarks directory.
However, you can probably devise a timeit-based microbenchmark easily. No need to be sophisticated :-)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
pitrou
commented
Sep 11, 2019
Looks like the AppVeyor failure needs fixing, can you take a look @kszucs ? |
Uh oh!
There was an error while loading. Please reload this page.
jorisvandenbossche
left a comment
There was a problem hiding this comment.
I quickly tried this out, and added a few comments. But looks good!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jorisvandenbossche
commented
Sep 11, 2019
For the pathlib comment, the other alternative would also be to add it as a dependency (for python 2 only, just like also enum34 is a py2 only dependency for enum backport). |
kszucs
commented
Sep 11, 2019
After transitioning to py3 only it would be reasonable to use pathlib.Path objects as return types indeed (at least that's my preference). I suggest to create a JIRA where we can discuss further (possible involves other parts of pyarrow), meanwhile I've set the return types to string. |
pitrou
commented
Sep 11, 2019
You mean from |
pitrou
commented
Sep 11, 2019
Actually, no. pathlib paths are only for the local filesystem, not for arbitrary resources (e.g. S3). Instead you should return a plain string. |
jorisvandenbossche
commented
Sep 11, 2019
Ah, that solves the python 2 / should we depend on pathlib question then. |
kszucs
commented
Sep 11, 2019
We could have a pathlib compatible Path implementation as well. Whatever, the API we're providing is not stable yet. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
pitrou
commented
Sep 16, 2019
For now I'm not doing a full review again, feel free to ping me when you think you're ready (and CI is fixed :-)). |
kszucs
commented
Sep 17, 2019
@pitrou this should be green now. I'd like to move forward with bindings for S3 once it is merged. |
pitrou
left a comment
There was a problem hiding this comment.
Just two more comments, sorry ;-)
Uh oh!
There was an error while loading. Please reload this page.
| since the C++ side then decodes from utf-8. On Unix, os.fsencode may be | ||
| better. | ||
| """ | ||
| return tobytes(_stringify_path(path)) |
There was a problem hiding this comment.
I still think this shouldn't accept Path objects, only str and bytes. Path objects are only valid for local paths, but here we are dealing with paths in arbitrary systems.
There was a problem hiding this comment.
@pitrou done, actually we don't accept bytes neither, only strings (we're discussing it previously)
kszucs
commented
Sep 17, 2019
@pitrou done, builds are green, the travis error is about codecov upload failure. |
pitrou
commented
Sep 17, 2019
This is a very nice start, thank you :-) |
arrow/python/util/datetime.hone level upper, enabling to be used by the bindings