This code checks a parent table's structure to make sure it supports tenant-specific tables on top of it.  Looking at QueryConstants.CREATE_TABLE_METADATA, you created TENANT_TYPE_ID column as type VARCHAR.  Do you want me to change that to VARBINARY?