bamaer commented on PR #8665:
URL: https://github.com/apache/hop/pull/8665#issuecomment-5945968219

   **Blockers**
   
   1. **Numeric fields are not saved.** `limitRowsNumber` 
(`WriteToLogMeta.java:117`), `cacheSize` and `rowLimit` 
(`DatabaseJoinMeta.java:140`, `:201`) are `int` fields behind 
`GuiElementType.TEXT` widgets. `GuiCompositeWidgets.getWidgetsData` does not 
convert a `String` for an `int` setter: it logs `Value of type java.lang.String 
does not fit setter setLimitRowsNumber(int) ... value not applied` (same for 
`setCacheSize` / `setRowLimit`) and keeps the old value. In a SWTBot test, 
changing "Nr of rows to print" from 5 to 42 and pressing OK leaves 5 in the 
meta.
      *Fix:* add String→int/long conversion (`Const.toInt`) in 
`GuiCompositeWidgets`, or persist these three by hand in `persistContents`; add 
a test that edits a number and presses OK.
   
   2. **Resolved SQL parameters and the line/column readout are invisible.** In 
`addSql`, `wSql` is attached to the bottom of the tab 
(`DatabaseJoinDialog.java:267`) while `wlPosition` and the resolved-parameter 
table hang below it (`:274`), outside the tab's client area. Measured in the 
default dialog: tab content 317px high, position label at y=321, table at 
y=379; same at 1000×900. `theSqlTabHoldsBothTheEditorAndTheResolvedParameters` 
still passes because SWTBot finds the clipped table.
      *Fix:* attach `wResolvedParam` to the bottom, stack `wlPosition` and its 
label above it, and end `wSql` at `wlPosition`. Assert the bounds lie inside 
the tab, like the Write to log overlap test does.
   
   **Should fix**
   
   3. **DB Join OK can no longer be confirmed with a variable connection.** 
`ok()` (`DatabaseJoinDialog.java:750`) now returns when `findDatabase(...)` is 
null, so a connection like `${DB}` that only resolves at runtime blocks OK 
entirely; before, the dialog warned and saved. It also runs 
`getWidgetsContents` (line 744) before the check, so a later Cancel keeps the 
edits.
      *Fix:* keep the warning but still close (or skip the check when the name 
contains a variable), and validate before writing to `input`.
   
   4. **Browse (SQL from file).** `GuiCompositeWidgets` calls 
`refreshWidgetsAfterButton` immediately and again via `asyncExec`, so 
`afterButtonPressed` (`:175`), which opens the file dialog, runs twice per 
click and the picker opens twice. `buttonPressed` (`:171`) also writes all 
widgets into the meta, so Cancel after Browse keeps the edits (checkbox changes 
survive Cancel in a SWTBot test).
      *Fix:* make `sqlFromFile` a `GuiElementType.FILENAME` widget and drop the 
no-op `browseSqlFromFile` on the Meta; `onSqlFromFileChanged` already loads the 
file when the path changes.
   
   Verified: code reviewed; both modules built; the PR's uitests run headless 
(all pass). 1, 2 and 4 reproduced with additional SWTBot tests; 3 from code, 
compared against the dialog on `main`.
   


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

Reply via email to