Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 21 Mar 2012 @ 14:21:43 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: How records get hashed if PI value is NULL?
 
From:   Dave Wellman

Hi,

Using exactly the same rules and logic as if the value is not NULL. For hashing purposes NULL is a 'value'.

The PI 'value' gets passed to the hashing algorithm which returns a row hash. That gets mapped into the hash-maps to identify an AMP number. That AMP number is where the row is stored or located. Typically (but not always), NULLs will always hash to AMP number 0.

(I'm guessing this bit but I'm fairly sure it's correct) if the data type of the column is for instance an INTEGER, then the code passes a four byte field to the hashing algorithm which contains four bytes of x'00's. If the data type of the column was CHAR(3) then it passes either 3 spaces or 3 bytes of x'00's.


Cheers,

Dave

Ward Analytics Ltd - Information in motion (www.ward-analytics.com)



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023