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

ISSUE-2994: add function current_user() #2995

Merged
merged 1 commit into from
Nov 24, 2021

Conversation

flaneur2020
Copy link
Member

I hereby agree to the terms of the CLA available at: https://databend.rs/policies/cla/

Summary

this PR depends on #2986

this PR adds a current_user() function, to test the session's current user

Changelog

  • Improvement

Related Issues

Fixes #2994

Test Plan

Unit Tests
Stateless Tests

@databend-bot
Copy link
Member

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@flaneur2020 flaneur2020 marked this pull request as draft November 24, 2021 03:16
@flaneur2020 flaneur2020 changed the title WIP: add function current_user() WIP: ISSUE-2994: add function current_user() Nov 24, 2021
@flaneur2020 flaneur2020 force-pushed the add-current-user-func branch 3 times, most recently from 7e1b108 to 2846a1b Compare November 24, 2021 07:28
@flaneur2020 flaneur2020 force-pushed the add-current-user-func branch from 2846a1b to 0a58baa Compare November 24, 2021 07:30
@flaneur2020 flaneur2020 marked this pull request as ready for review November 24, 2021 07:32
@flaneur2020 flaneur2020 changed the title WIP: ISSUE-2994: add function current_user() ISSUE-2994: add function current_user() Nov 24, 2021
@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2021

Codecov Report

Merging #2995 (0a58baa) into main (5eec227) will increase coverage by 0%.
The diff coverage is 35%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2995   +/-   ##
=====================================
  Coverage     68%     68%           
=====================================
  Files        650     651    +1     
  Lines      34293   34324   +31     
=====================================
+ Hits       23517   23542   +25     
- Misses     10776   10782    +6     
Impacted Files Coverage Δ
common/planners/src/plan_expression.rs 83% <ø> (ø)
common/functions/src/scalars/udfs/current_user.rs 16% <16%> (ø)
common/functions/src/scalars/udfs/udf.rs 90% <100%> (+<1%) ⬆️
query/src/functions/context_function.rs 93% <100%> (+1%) ⬆️
query/src/functions/context_function_test.rs 92% <100%> (+2%) ⬆️
common/management/src/cluster/cluster_mgr.rs 78% <0%> (-3%) ⬇️
query/src/clusters/cluster.rs 54% <0%> (-1%) ⬇️
query/src/common/mod.rs 83% <0%> (+12%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5eec227...0a58baa. Read the comment docs.

@BohuTANG
Copy link
Member

/lgtm

@BohuTANG
Copy link
Member

This need a document issue :D

@flaneur2020
Copy link
Member Author

@BohuTANG thank you reminding, i've created a document issue for this: #3006 qwq

@BohuTANG BohuTANG merged commit 025238b into databendlabs:main Nov 24, 2021
@flaneur2020 flaneur2020 deleted the add-current-user-func branch November 24, 2021 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add function current_user()
4 participants