Skip to main content
Announcements
A fresh, new look for the Data Integration & Quality forums and navigation! Read more about what's changed.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Talend ESB 7.1.1 : Important bug, test returns false instead of true

Hi guys,

 

Following a previous topic I've made here (https://community.talend.com/t5/Design-and-Development/Conditional-component-simple-if-true-commit-e...), I've decided to open a new one specially dedicated to this bug I've just isolated a bit more now.

 

I encountered this bug two times in two days that's why I would like it to be identified or maybe patched if this is really a talend issue.

 

I simplified my flow like this now :

 

0683p000009M11c.png

 

 

That flow has only one goal : count the number of rows returned by a join between two tables (located in two different db's)

 

Then the result is compared to an other value which should be provided by a parent job (using context value). In this exemple, I've only ran the child job so I defined the value right inside the context like this :

 

0683p000009M11h.png

 

Below, I printed both values and then compared them.

 

0683p000009M11r.png

 

Finally, here is the result i get after running my job :

 

0683p000009M121.png

 

Good luck & Have fun 0683p000009MACn.png

 

Guillaume.

Labels (4)
1 Solution

Accepted Solutions
3 Replies
vapukov
Master II

Anonymous
Not applicable
Author

Hello Vapukov,

 

Friends of mine told me last week that it was due to bad use of java, as you did.

But what makes them think this way ? I simply show them the issue upside down.

 

I was doing this comparison (with == instead of equals method) inside two different components : a tMap and this tJavaRow.

As it was working great inside the tMap I have postulated that this behaviour was right.

 

Then, I discovered it was not working inside the tJavaRow and I thought the issue was there, that's why I created this topic.

Fact is I only show you (and friends of mine) the content of the tJavaRow without even talking about my tMap. This way you all found the solution which is really great, thanks again 0683p000009MACn.png

 

BUT, now I discovered that the tMap I thought was working well ... is actually not ... (see screenshots below)

 

0683p000009M1OI.png0683p000009M1Sd.png0683p000009M1Sn.png

 

As you can see, here I'm using == to compare two integers greater than 127 ...

If I follow your instructions and how Java should work in this particular case, the result must be false... But it returns me true...

 

And because of that, I thought this tJavaRow was not working well ...

So it seems there is an issue though with Talend in this case, no ?

 

Guillaume

 

vapukov
Master II

if You check schema you will see for INteger type - Int/Integer, it means type could be any of 2

but Int does not equal Integer 

 

equal - more safe and predicted