Adalennis opened a new issue, #9635:
URL: https://github.com/apache/hop/issues/9635

   ### Apache Hop version?
   
   2.20.0
   
   ### Java version?
   
   Java 21
   
   ### Operating system
   
   macOS
   
   ### What happened?
   
   With a fixed table name (not taken from a field) and a schema name, Column 
exists returns N for every column, also for columns that exist.
   
   Cause
   ColumnExists.processRow combines the schema and the table into 
data.tableName with getQuotedSchemaTableCombination on the first row. It then 
calls Database.checkColumnExists(schemaname, tableName, columnName), which 
combines them again. On H2 the transform checks the table 
PUBLIC."PUBLIC.DBLOOKUP". When the table name comes from a field, the 
combination is done once and the check works: 
transforms/columnexists-table-field.hpl, with schema PUBLIC, checks 
PUBLIC.DBLOOKUP.
   
   The sample shows it too
   transforms/columnexists-basic.hpl sets the table name to PUBLIC.DBLOOKUP 
with no schema. The whole name is quoted as one identifier, "PUBLIC.DBLOOKUP", 
so the sample returns N for all six rows. With table DBLOOKUP it returns Y for 
id, ID, description and DESCRIPTION, and N for desc and DESC, as expected.
   
   To reproduce
   
   Open transforms/columnexists-basic.hpl in the samples project.
   In Column exists, set the schema name to PUBLIC and the table name to 
DBLOOKUP.
   Run the pipeline and preview the output: result is N on every row.
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Transforms


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