apache / kyuubi

Apache Kyuubi is a distributed and multi-tenant gateway to provide serverless SQL on data warehouses and lakehouses.
https://kyuubi.apache.org/
Apache License 2.0
2.11k stars 914 forks source link

[KYUUBI #6726] Support trino stage progress #6759

Open taylor12805 opened 1 month ago

taylor12805 commented 1 month ago

:mag: Description

Issue References ๐Ÿ”—

This pull request fixes https://github.com/apache/kyuubi/issues/6726

Describe Your Solution ๐Ÿ”ง

Add trino statement progress

Types of changes :bookmark:

Test Plan ๐Ÿงช

Behavior Without This Pull Request :coffin:

Behavior With This Pull Request :tada:

Related Unit Tests


Checklist ๐Ÿ“

Be nice. Be informative.

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 0.00%. Comparing base (2d64255) to head (6646c95). Report is 52 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #6759 +/- ## ======================================= Coverage 0.00% 0.00% ======================================= Files 684 687 +3 Lines 42282 42442 +160 Branches 5767 5793 +26 ======================================= - Misses 42282 42442 +160 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


๐Ÿšจ Try these New Features:

lsm1 commented 1 month ago

@taylor12805 Before submitting the pull request, we can use ./dev/reformat to format the code.

taylor12805 commented 1 month ago

@taylor12805 Before submitting the pull request, we can use ./dev/reformat to format the code.

@lsm1 thanks for reminding. I added test case for trino statement progress, however since trino don't have sleep function, I can't mock multiple stages case. Do you have some ideas?

lsm1 commented 1 month ago

@taylor12805* Before submitting the pull request, we can use ./dev/reformat to format the code.

@lsm1* thanks for reminding. I added test case for trino statement progress, however since trino don't have sleep function, I can't mock multiple stages case. Do you have some ideas?

Adding a sleep function in Trino is not straightforward, so simple unit tests should be sufficient for now.

lsm1 commented 2 days ago

@taylor12805 Please fix the failing test

- get operation progress *** FAILED ***
  The code passed to eventually never returned normally. Attempted 1623 times over 25.002736579 seconds. Last failure message: Expected List("Stage-0 ........", "FINISHED", "5", "5", "0", "0", "0", ""), but got Buffer("Stage-0 ........", "FINISHED", "3", "3", "0", "0", "0", ""). (TrinoOperationProgressSuite.scala:43)