hive icon indicating copy to clipboard operation
hive copied to clipboard

HIVE-26126: Allow capturing/validating SQL generated from HMS calls i…

Open zabetak opened this issue 3 years ago • 4 comments

What changes were proposed in this pull request?

  1. Create logger configuration (tests only) for writing specific DataNucleus SQL queries to (new) operation log files.
  2. Add hook copying the content of datanucleus log files to session's console for use in qtests.
  3. Avoid creating appenders & files when hook is inactive.
  4. Enable the hook on certain tests with partitions and update output.

Why are the changes needed?

For motivation see HIVE-26126

Does this PR introduce any user-facing change?

No, the change only affects test.

How was this patch tested?

See changes in .q and .q.out files

zabetak avatar Apr 08 '22 10:04 zabetak

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reach out on the [email protected] list if the patch is in need of reviews.

github-actions[bot] avatar Jun 08 '22 00:06 github-actions[bot]

Hey bot please keep this open!

zabetak avatar Jun 08 '22 10:06 zabetak

+1, changes look good to me!

dengzhhu653 avatar Aug 05 '22 09:08 dengzhhu653

Thanks for the review @dengzhhu653 ! My main concern at the moment is that the output depends on the state of the metastore. Since we are reusing the derby database across tests the output depends on the number and order that tests are executed. I cannot merge this till we find a solution where the output is stable and predictable.

zabetak avatar Aug 05 '22 10:08 zabetak

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Feel free to reach out on the [email protected] list if the patch is in need of reviews.

github-actions[bot] avatar Oct 05 '22 00:10 github-actions[bot]