Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.
This repository was archived by the owner on May 17, 2024. It is now read-only.

Unexpected behavior using min_key/max_key #401

@RoderickJDunn

Description

@RoderickJDunn

Describe the bug
When I pass in the min_key and/or max_key parameters, I would expect data-diff to skip the query_key_range step since it already knows the min/max keys.

For example, if I want to restrict the account ID range by passing in min_key=000000000001 and max_key=R90909RDD099, the tool still executes query_key_range with a query like this:

SELECT cast(min("ACCT_ID") as varchar(1024)), cast(max("ACCT_ID") as varchar(1024)) 
FROM "accounts" 
WHERE ("ACCT_ID" >= '000000000001') AND ("ACCT_ID" < 'R90909RDD099')

IMO this query should've been skipped since the user already told data-diff the min/max values for ACCT_ID.

This query can be slow for large tables, so it would be great to bypass it if the min/max keys are already known.

Describe the environment
Ubuntu
data-diff version: 608312d944ada6ba07c810f25a4bd638933c8fc1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstaleIssues/PRs that have gone stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions