add setrefs hooks and codegen for hashjoin