Matthew-DWM opened a new issue, #9625:
URL: https://github.com/apache/texera/issues/9625

   ### Feature Summary
   
   The JVM [`LargeBinary` 
constructor](https://github.com/apache/texera/blob/f030df12b73c2c6a8f2e8b325c6e762d54fead7f/common/workflow-core/src/main/scala/org/apache/texera/amber/core/tuple/LargeBinary.java#L48-L58)
 only checks the `s3://` prefix. References with no bucket or no object key are 
accepted and fail later, when a stream calls S3. The Python `largebinary` is 
being changed to reject them (#8279), so a keyless reference built on the JVM 
would fail in the next Python operator instead.
   
   Before: `new LargeBinary("s3://bucket")` is accepted with an empty object key
   
   After: a reference must contain both a bucket and object key
   
   Reproduction evidence:
   
   `LargeBinarySpec` pins the bucket-only case as valid in ["return an empty 
object key when the URI carries no 
path"](https://github.com/apache/texera/blob/f030df12b73c2c6a8f2e8b325c6e762d54fead7f/common/workflow-core/src/test/scala/org/apache/texera/amber/core/tuple/LargeBinarySpec.scala#L84-L88).
 On JDK 17 the getters return:
   - a `null` bucket for `s3:///object`;
   - an empty key for `s3://bucket` and `s3://bucket/`;
   - a thrown `IllegalArgumentException` for `s3://`.
   
   Found while verifying the fix for #8279.
   
   ### Proposed Solution or Design
   
   Mirror the Python check, following 
[`LakeFSStorageClient.parsePhysicalAddress`](https://github.com/apache/texera/blob/f030df12b73c2c6a8f2e8b325c6e762d54fead7f/common/workflow-core/src/main/scala/org/apache/texera/amber/core/storage/util/LakeFSStorageClient.scala#L409-L437),
 which already makes this check for LakeFS addresses. Parse the URI in the 
constructor, wrapping any parse error, and throw 
`IllegalArgumentException("LargeBinary URI must include a bucket and object 
key, got: " + uri)` when the bucket is empty or the path is empty after 
removing all leading slashes, as Python does. Then change the bucket-only spec 
case to expect rejection.
   
   ### Affected Area
   
   Other, Workflow Engine (Amber)


-- 
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]

  • [I] JVM large binary accepts in... Matthew-DWM (via GitHub) via notifications

Reply via email to