You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@texera.apache.org by "bobbai00 (via GitHub)" <gi...@apache.org> on 2025/10/03 23:01:45 UTC

[I] Non-deterministic parameter ordering in JOOQ-generated Dataset constructor [texera]

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: dev-unsubscribe@texera.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Non-deterministic parameter ordering in JOOQ-generated Dataset constructor [texera]

Posted by "bobbai00 (via GitHub)" <gi...@apache.org>.
bobbai00 closed issue #3821: Non-deterministic parameter ordering in JOOQ-generated Dataset constructor
URL: https://github.com/apache/texera/issues/3821


-- 
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: dev-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org