1. add test case for sub class of schema 2. refactor the code for better UT coverage

refactor the code for better UT coverage
1. change class Table_Stats to Table_Stats_$type
2. change class Relation_Stats to Relation_Stats_$type