kz930 opened a new pull request, #7982: URL: https://github.com/apache/texera/pull/7982
### What changes were proposed in this PR? An Advanced trainer emits one keyword argument per row of its Parameter Setting table. Nothing stopped two rows from naming the same parameter, and two rows naming one parameter emitted that keyword twice, which Python rejects while it compiles the operator, before any of it runs. What the user saw was a SyntaxError pointing at a line of generated code rather than at the row they had added. The row is now refused in two places. In the form, a row whose parameter is already set by another row is marked invalid and says so under the dropdown, alongside the validators the property editor already builds from the schema. The constraint is declared on the field itself, as a `uniqueAmongRows` key the operator's schema carries, rather than by naming the operator in the frontend, so any repeated section that needs the same rule can ask for it. `uniqueItems` is not the constraint that was missing: two rows naming one parameter differ in their other fields, so they are distinct items while still colliding on the keyword. The descriptor refuses the same thing while the workflow compiles. That is what names the operator and the parameter in the error, and it also covers a workflow submitted through the API, which never passes through the form. ### Any related issues, documentation, discussions? Closes #7952 ### How was this PR tested? New unit tests on both sides. On the descriptor, two rows naming one parameter must be refused with the parameter named, including the mixed case where one row reads a value and the other reads a column, and two rows naming different parameters must still emit both. On the frontend, the property editor must attach the validator to a field the schema marks unique, reject a value another row already holds, accept one no row holds, and produce the message shown to the user. The three `sklearnAdvanced.base` Scala specs pass (17 tests), as does the wider `machineLearning` package (54 tests), with `scalafmtCheckAll` and scalafix clean. `operator-property-edit-frame.component.spec.ts` passes at 237 tests. I also dumped the generated JSON schema for the SVC trainer to confirm the new key lands on the `parameter` property next to its enum of parameter names, which is what the frontend reads. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 5) -- 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]
