I encounter the following issue on a join stage on 5 columns (3 varchar, 2 numeric). The 2 inputs are sorted and hash partitioned on the 5 columns. For a given combination of the 5 key columns, we were expecting a match between the 2 inputs, and Datastage job did not return a match.
I found out that the issue is due to the fact that the numeric data types in the left input were not equal to the numeric data types of the right input (Dec 10,4 vs Dec 38,10 if I am correct), even if the numeric values were equal.
The solution was to convert the numeric data types to get the same on the 2 inputs.
Did someone meet the same issue ?
This means that applying Hash partition to a number can give a different value depending on the data type and not only on the value of the number ?
Hash partition with difference in numeric key columns
Moderators: chulett, rschirm, roy
Hash partition with difference in numeric key columns
Thuong
best regards
best regards
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
You correctly found the issue, Yes the hash calculation takes the data type in to account as well, hence the issue. Even if the extended property of a varchar (unicode) is set it will have different hash than that of a varchar.
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: