Some minor change.

1. isolated between buildWhereClause and buildCheckConstraint.
2. skip ddl when condition is empty.