Skip to content

Improve correctness check for RowType columns#14036

Merged
mbasmanova merged 1 commit intoprestodb:masterfrom
kvaturka:master
Feb 7, 2020
Merged

Improve correctness check for RowType columns#14036
mbasmanova merged 1 commit intoprestodb:masterfrom
kvaturka:master

Conversation

@kvaturka
Copy link
Contributor

Improve correctness check of row types by applying specific validation to individual fields

Part of #13809

== RELEASE NOTES ==

Verifier Changes
* Add specific validation checks for the individual fields when validating a row column.

@kvaturka
Copy link
Contributor Author

Please take a closer look on validation output format.
It might be to verbose and hard to read.
I believe it needs to be improved.

@mbasmanova
Copy link
Contributor

@kvaturka Would you squash commits?

@kvaturka kvaturka closed this Feb 4, 2020
@kvaturka kvaturka reopened this Feb 4, 2020
@caithagoras
Copy link
Contributor

Apologize for the delay. I'll get it reviewed by tomorrow morning.

@caithagoras
Copy link
Contributor

This is how our error message looks like in a column mismatch case. The mismatched column section has one column at a time. In a row column case, can we do the same in terms of 1 field per line? That would be more readable.

COLUMN MISMATCH
Control 36100 rows, Test 36100 rows
Mismatched Columns:
  agg__1 (bigint): control(checksum: b3 ef 0b 4d 5e 18 65 7c) test(checksum: f4 d3 7e 8f 17 29 6b c6)
  gbc__0 (bigint): control(checksum: 48 d5 1f ca be de ea b6) test(checksum: 4c 82 62 cc 7b e1 66 01)
  gbc__1 (varchar): control(checksum: ca 44 f8 14 fd 29 da db) test(checksum: 04 d8 4a 5a 33 21 ff 46)

To achieve that, you may want to change ColumnMatchResult.message to List<String> messages.

@caithagoras
Copy link
Contributor

Commit title is too long and thus is cut off. (max 72 characters).
You can simply say Improve correctness check for RowType columns.

@kvaturka
Copy link
Contributor Author

kvaturka commented Feb 6, 2020

I have changed mismatch output for RowType.
Each field mismatch will be on new line.
r row(i int, biging):

COLUMN MISMATCH
Control 36100 rows, Test 36100 rows
Mismatched Columns:
  r$i (int): control(checksum: b3 ef 0b 4d 5e 18 65 7c) test(checksum: f4 d3 7e 8f 17 29 6b c6)
  r$$col_2 (bigint): control(checksum: 48 d5 1f ca be de ea b6) test(checksum: 4c 82 62 cc 7b e1 66 01)

@caithagoras
Copy link
Contributor

lgtm % nit
Travis failures are related, please take a look.

@caithagoras caithagoras changed the title Improve correctness check of row types by applying specific validation to individual fields Improve correctness check for RowType columns Feb 7, 2020
@caithagoras
Copy link
Contributor

Thank you for contributing!

@mbasmanova mbasmanova merged commit 2de5d7f into prestodb:master Feb 7, 2020
@mbasmanova
Copy link
Contributor

@kvaturka Thank you for the contribution.

@caithagoras caithagoras mentioned this pull request Feb 20, 2020
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants