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

Record filters and masks #3183

Merged
merged 6 commits into from
Mar 27, 2020
Merged

Conversation

martint
Copy link
Member

@martint martint commented Mar 20, 2020

Adds a new field to query metadata section in the query completion event with the following structure:

"tables": [
   {
      "catalog": "...",
      "schema": "...",
      "table": "...",
      "authorization": "...",

      "filters": [ "...", ... ]
      "columns": [
         {
             "column": "..."
             "masks": [ "...", ...]
         },
         ...
      ]
   },
   ...
]

@cla-bot cla-bot bot added the cla-signed label Mar 20, 2020
@kokosing kokosing requested a review from s2lomon March 20, 2020 20:06
@martint martint changed the title Record filters masks Record filters and masks Mar 20, 2020
@@ -226,6 +226,7 @@ private static QueryInfo immediateFailureQueryInfo(
ImmutableList.of(),
ImmutableSet.of(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are missing information about accessed:

  • procedures (must have)
  • functions (must have)
  • DDL queries
  • set session
  • SHOW queries
  • query checks

All these surely should go as separate pull requests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DDL queries can be inferred from the query type + user + target table. Session properties can be inferred from the session properties in the query + user. Functions and procedures can be added, but I'll do it in a separate PR.

@martint
Copy link
Member Author

martint commented Mar 23, 2020

Updated

@martint martint requested a review from kokosing March 23, 2020 21:52
Copy link
Member

@kokosing kokosing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

% comments about tests

@martint martint force-pushed the record-filters-masks branch 3 times, most recently from 03180de to 01a27a4 Compare March 25, 2020 15:33
@martint martint force-pushed the record-filters-masks branch 2 times, most recently from 32ff774 to db2dd44 Compare March 26, 2020 23:52
It adds a field to the query metadata event with the following structure:

"tables": [
   {
      "catalog": "...",
      "schema": "...",
      "table": "...",
      "authorization": "...",

      "filters": [ "...", ... ]
      "columns": [
         {
             "column": "..."
             "masks": [ "...", ...]
         },
         ...
      ]
   },
   ...
]
@martint martint merged commit 1b55b86 into trinodb:master Mar 27, 2020
@martint martint mentioned this pull request Apr 6, 2020
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants