bobbai00 opened a new issue, #3821:
URL: https://github.com/apache/texera/issues/3821
## Description
The JOOQ-generated `Dataset.java` class has a constructor with
non-deterministic parameter ordering. This can cause issues when manually
creating Dataset instances using the constructor, as the parameter order may
change between JOOQ code generations.
## Problem
In `DatasetResource.scala`, we were manually constructing a new Dataset
object by passing parameters to the constructor:
```scala
new Dataset(
createdDataset.getDid,
createdDataset.getOwnerUid,
createdDataset.getName,
createdDataset.getRepositoryName,
createdDataset.getIsPublic,
createdDataset.getIsDownloadable,
createdDataset.getDescription,
createdDataset.getCreationTime
)
```
However, the constructor parameter order in the generated class is
non-deterministic and may not match this order.
## Solution
Use JOOQ's built-in `into()` method to convert from DatasetRecord to Dataset
POJO:
```scala
createdDataset.into(classOf[Dataset])
```
This avoids relying on constructor parameter ordering entirely.
--
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]