gerashegalov commented on code in PR #59313:
URL: https://github.com/apache/spark/pull/59313#discussion_r4263337459
##########
python/pyspark/sql/session.py:
##########
@@ -2292,6 +2298,17 @@ def addArtifacts(
"condition": "True together",
},
)
+ # Native data source packages are artifacts of the session in the JVM,
whatever the
+ # flags, as with Spark Connect. The JVM resolves URIs, such as
file:///tmp/a.sparkpkg,
+ # but resolves a relative path against its own working directory, so
it gets an absolute
+ # path instead. A Windows path, such as C:/a.sparkpkg, is a path too.
+ for p in path:
+ if p.endswith(".sparkpkg"):
+ if urlparse(p).scheme and not PureWindowsPath(p).drive:
Review Comment:
nit: now it stops working for unlikely filenames with colons such as
`some:1.sparkpkg` . Probably we should combine with what you had before. if a
`file:` URL use urlparse, otherwise `os.path.abspath`
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]