Skip to content

Commit

Permalink
Update lookup
Browse files Browse the repository at this point in the history
  • Loading branch information
ericaporter committed Apr 22, 2024
1 parent ea80879 commit 1b73148
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/dfe/analytics/services/generic_checksum_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def build_select_and_order_clause(order_column, table_name_sanitized)
def build_where_clause(order_column, table_name_sanitized, checksum_calculated_at_sanitized)
return '' unless WHERE_CLAUSE_ORDER_COLUMNS.map(&:downcase).include?(order_column.downcase)

"WHERE DATE_TRUNC('milliseconds', #{table_name_sanitized}.#{order_column.downcase}) < #{checksum_calculated_at_sanitized}"
"WHERE #{table_name_sanitized}.#{order_column.downcase} < #{checksum_calculated_at_sanitized}"
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/dfe/analytics/services/postgres_checksum_calculator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def build_select_and_order_clause(order_column, table_name_sanitized)
def build_where_clause(order_column, table_name_sanitized, checksum_calculated_at_sanitized)
return '' unless WHERE_CLAUSE_ORDER_COLUMNS.map(&:downcase).include?(order_column.downcase)

"WHERE DATE_TRUNC('milliseconds', #{table_name_sanitized}.#{order_column.downcase}) < DATE_TRUNC('milliseconds', TIMESTAMP #{checksum_calculated_at_sanitized})"
"WHERE DATE_TRUNC('milliseconds', #{table_name_sanitized}.#{order_column.downcase}) < DATE_TRUNC('milliseconds', '#{checksum_calculated_at_sanitized}')"
end
end
end
Expand Down

0 comments on commit 1b73148

Please sign in to comment.