Skip to content

Commit

Permalink
fix: Row validation optimization to avoid select all columns
Browse files Browse the repository at this point in the history
  • Loading branch information
sramsrinivasan committed Oct 6, 2022
1 parent 9ebcae9 commit 5a79223
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions data_validation/query_builder/query_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,10 +488,14 @@ def compile(self, validation_type, data_client, schema_name, table_name):
)

if validation_type == consts.ROW_VALIDATION:
calc_table = calc_table.projection(self.compile_comparison_fields(calc_table))
calc_table = calc_table.projection(
self.compile_comparison_fields(calc_table)
)
else:
if self.comparison_fields:
calc_table = calc_table.mutate(self.compile_comparison_fields(calc_table))
calc_table = calc_table.mutate(
self.compile_comparison_fields(calc_table)
)
compiled_filters = self.compile_filter_fields(calc_table)
filtered_table = (
calc_table.filter(compiled_filters) if compiled_filters else calc_table
Expand Down

0 comments on commit 5a79223

Please sign in to comment.