Fixed Illegal PREWHERE Error in Merge Tables for Distributed Tables

Fixed the Illegal PREWHERE error when reading from Merge tables for Distributedtables.