Fix issue with partition prunning and add to-date and from-date params