revert change made in validateTable for calculating schema for validating
@@ -133,7 +133,7 @@ public class StandardDataValidator implements DataValidator, Serializable {
public DataValidatorResult validateTable(@Nonnull final String databaseName, @Nonnull final String sourceTableName, @Nonnull final String targetTableName, @Nonnull final String partition,
final int numPartitions, @Nonnull final Map<String, FieldPolicy> policyMap, @Nonnull final HiveContext hiveContext) {
// Extract fields from a source table
- StructField[] fields = resolveSchema(databaseName, sourceTableName, hiveContext);
+ StructField[] fields = resolveSchema(databaseName, targetTableName, hiveContext);
FieldPolicy[] policies = resolvePolicies(fields, policyMap);
String selectStmt = toSelectFields(policies);
