malinjawi commented on code in PR #13386:
URL: https://github.com/apache/gluten/pull/13386#discussion_r4652330200
##########
backends-velox/src-delta4/main/scala/org/apache/spark/sql/delta/GlutenDeltaNativeWriteGate.scala:
##########
@@ -220,6 +245,14 @@ object GlutenDeltaNativeWriteGate {
private def lower(key: String): String = key.toLowerCase(Locale.ROOT)
+ // Fails closed: if the native probe cannot run in this JVM, the write falls
back.
+ private def registeredInVelox(path: String): Boolean =
+ try {
+
VeloxFileSystemValidationJniWrapper.allSupportedByRegisteredFileSystems(Array(path))
+ } catch {
+ case _: LinkageError | NonFatal(_) => false
Review Comment:
Thanks @felipepessoto, good catch, that log message would have been pretty
misleading.
I went with your suggestion: `registeredInVelox` just calls JNI now, and the
catch lives in `unsupportedPath`. So if the probe itself blows up you get a
"could not check" reason with the exception, not a claim that the filesystem is
missing. Either way it still falls back to Delta's writer.
Added a test for it too. Let me know if anything else looks off.
--
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]