samuelwillyanto1 opened a new issue, #8904:
URL: https://github.com/apache/hop/issues/8904
### Apache Hop version?
2.20.0-SNAPSHOT
### Java version?
21
### Operating system
Windows
### What happened?
When using the workflow action **"Columns exist in a table"**
(`COLUMNS_EXIST`), if no database connection is specified (or the connection is
missing) and the columns list is empty, the action logs an error:
`Columns exist in a table - No database connection is defined.`
However, it falsely finishes with **`(result=[true])`** and `nrErrors = 0`.
As a result, subsequent workflow hops evaluate the action as successful,
routing to the success branch and masking critical configuration or connection
failures.
Additionally, in `ActionColumnsExistDialog`:
- The **"Get columns"** and schema **"Browse"** buttons fail silently (dead
buttons) without showing any feedback if the database connection or metadata is
null/empty.
- Schema sorting in the dialog can trigger a `NullPointerException` on
schema-less database drivers (e.g., SQLite).
---
### Steps to Reproduce
1. Create a new Workflow.
2. Add a **Start** action, a **Columns exist in a table** action, and
connect them with an evaluation hop.
3. Open the **Columns exist in a table** action settings:
- Leave **Connection** empty.
- Enter a **Table name** (e.g. `users`).
- Leave the **Columns** table empty (no column rows).
4. Click **OK** and run the workflow.
5. Inspect the execution log:
- Even though the error log says `No database connection is defined.`,
the action reports `Finished action [Columns exist in a table] (result=[true])`.
<img width="1185" height="555" alt="Image"
src="https://github.com/user-attachments/assets/74cc328a-24a6-4e38-a670-8cfcd268d0aa"
/>
---
### Expected Behavior
The action should immediately fail (`result=[false]`, `nrErrors = 1`)
whenever:
- No database connection is specified or the database metadata cannot be
found.
- The table name is empty.
- The columns list is empty.
The action should only report `result=[true]` if a valid database connection
exists, the table exists, and all specified columns actually exist in the table.
---
### Actual Behavior
The action evaluates `0 == 0` when comparing existing columns to the empty
list size, causing it to report false positive success (`result=[true]`).
### Issue Priority
Priority: 3
### Issue Component
Component: Actions
--
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]