Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TableDiff.col_rename not updated when show_unchanged_columns = true #189

Open
bmsq opened this issue May 2, 2023 · 0 comments
Open

TableDiff.col_rename not updated when show_unchanged_columns = true #189

bmsq opened this issue May 2, 2023 · 0 comments

Comments

@bmsq
Copy link

bmsq commented May 2, 2023

When constructing a TableDiff between the following tables with CompareFlags.show_unchanged_columns set to true:

Key,Name
Test1, AABBCC
Test2, DDEEFF
Key,Name2
Test1, AABBCC
Test2, DDEEFF

The TableDiff.col_renames property is set to 0 even though the resulting diff correctly shows the Name column being renamed to Name2.

I think this code is responsible for the issue:

if (!isEqual(v,pp,bb)) {
    have_schema = true;
    act = "(";
    act += v.toString(pp);
    act += ")";
    if (active_column!=null) {
        active_column[j] = 1;
        col_renames++;
    }
}

I don't understand why col_renames++ would only be performed when active_column!=null. Shouldn't this always be peformed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant