A 9 speed Deore groupset is presumably a 590, 530 or 510 series. Assume you have a 590 series which was made up to 2009 (the Shimano Wikipedia page has a nice table of group series and years), you can pull the Shimano 2009-2010 specifications from this page
Search in the PDF doc for 'RD-M59' and you'll find the RD-M592 model has a max sprocket size of 32 teeth and the RD-M591 model max sprocket of 28.
So technically no, your derailleur will not work with a 42 tooth cassette, however, many people seem to have had success with a derailleur hanger extension that drops the derailleur down so it clears the largest sprockets. The derailleur has enough total capacity (45 teeth difference for both models) to take up the chain slack if you will be running this with a single front ring.