officialasishkumar opened a new issue, #4374:
URL: https://github.com/apache/texera/issues/4374
### What happened?
`ParallelCSVScanSourceOpDesc.getPhysicalOp` throws a `NoSuchElementException`
whenever `customDelimiter` is `None` (the field's initializer default), which
happens when:
- the operator descriptor is constructed programmatically without setting a
delimiter, or
- the JSON payload sent by the frontend omits the `customDelimiter` field
(e.g. the user never changed it from the UI default).
The faulty guard on line 59 of `ParallelCSVScanSourceOpDesc.scala`:
```scala
if (customDelimiter.get.isEmpty) { // throws NoSuchElementException when
customDelimiter is None
customDelimiter = Option(",")
}
```
calls `.get` on the `Option` before checking whether it is defined.
The non-parallel sibling `CSVScanSourceOpDesc` already uses the correct
pattern:
```scala
if (customDelimiter.isEmpty || customDelimiter.get.isEmpty) {
customDelimiter = Option(",")
}
```
The parallel variant was missing the leading `customDelimiter.isEmpty ||`
guard,
apparently a copy-paste oversight.
**Expected behavior:** when no delimiter is provided, `getPhysicalOp` should
silently apply the documented default (`,`) and proceed normally, exactly as
`CSVScanSourceOpDesc` does.
### How to reproduce?
```scala
val desc = new ParallelCSVScanSourceOpDesc()
// customDelimiter is None by default — do not set it
desc.getPhysicalOp(DEFAULT_WORKFLOW_ID, DEFAULT_EXECUTION_ID)
// → java.util.NoSuchElementException: None.get
```
### Version
1.1.0-incubating (Pre-release/Master)
--
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]