Not really comparable at all in my opinion.
It's widely accepted that Israeli intelligence already had very comprehensively infiltrated Hamas, it seems inconceivable that they were completely unaware of plans for what was effectively a full scale military invasion, not just some small scale...