You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/27 20:55:39 UTC
[GitHub] [spark] sarutak opened a new pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
sarutak opened a new pull request #32372:
URL: https://github.com/apache/spark/pull/32372
### What changes were proposed in this pull request?
<!--
Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue.
If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
2. If you fix some SQL features, you can provide some references of other DBMSes.
3. If there is design documentation, please add the link.
4. If there is a discussion in the mailing list, please add the link.
-->
This PR proposes to add a new built-in function `mask` a data masking function which Hive already supports.
Actually, Hive supports 6 data masking functions.
I'll implement all of them but I'd like to introduce the most basic one in this PR.
`mask` in this PR is implemented to be compatible with the Hive's implementation.
In Hive, there is a [document}(https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-DataMaskingFunctions) for data masking functions but it seems outdated so I referred to the Hive's source code.
https://github.com/apache/hive/blob/rel/release-2.3.8/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMask.java
Actually, Hive's data masking functions can be applied to not only characters but also numeric types and date type.
In this PR, `mask` supports only `StringType` but I'll extends it for other types. So, this new function is categolized as a new group `data_masking_funcs` rather than `string_funcs`.
### Why are the changes needed?
<!--
Please clarify why the changes are needed. For instance,
1. If you propose a new API, clarify the use case for a new API.
2. If you fix a bug, you can clarify why it is a bug.
-->
For data masking, `mask` is more useful than `replace` or `translate`.
### Does this PR introduce _any_ user-facing change?
<!--
Note that it means *any* user-facing change including all aspects such as the documentation fix.
If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
If no, write 'No'.
-->
Yes. Users can use the new built-in function.
### How was this patch tested?
<!--
If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
If tests were not added, please describe why they were not added and/or why it was difficult to add.
-->
New tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] yaooqinn commented on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828117077
The Hive data masking functions were removed in https://github.com/apache/spark/pull/21786
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828094777
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/42533/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] sarutak commented on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
sarutak commented on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828336591
> The Hive data masking functions were removed in #21786
oh... I didn't notice.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828183689
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/138014/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828167745
**[Test build #138014 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/138014/testReport)** for PR 32372 at commit [`09227e7`](https://github.com/apache/spark/commit/09227e7a3cad38306d7caf40cc0a01f45cc15346).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] sarutak closed pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
sarutak closed pull request #32372:
URL: https://github.com/apache/spark/pull/32372
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-827944357
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828090759
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828072656
**[Test build #138014 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/138014/testReport)** for PR 32372 at commit [`09227e7`](https://github.com/apache/spark/commit/09227e7a3cad38306d7caf40cc0a01f45cc15346).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-827978234
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/42526/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA removed a comment on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-827944357
**[Test build #138007 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/138007/testReport)** for PR 32372 at commit [`f6baec9`](https://github.com/apache/spark/commit/f6baec96d38ff6a6b129c908c89792c38634fb23).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828183689
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/138014/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-827978234
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/42526/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828066697
**[Test build #138007 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/138007/testReport)** for PR 32372 at commit [`f6baec9`](https://github.com/apache/spark/commit/f6baec96d38ff6a6b129c908c89792c38634fb23).
* This patch **fails Spark unit tests**.
* This patch merges cleanly.
* This patch adds the following public classes _(experimental)_:
* `case class Mask(`
* `class MaskTransformer() `
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828072389
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/138007/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828072389
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/138007/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins removed a comment on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828094777
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/42533/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] SparkQA commented on pull request #32372: [SPARK-35247][SQL] Add `mask` built-in function as a data masking function
Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #32372:
URL: https://github.com/apache/spark/pull/32372#issuecomment-828072656
**[Test build #138014 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/138014/testReport)** for PR 32372 at commit [`09227e7`](https://github.com/apache/spark/commit/09227e7a3cad38306d7caf40cc0a01f45cc15346).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org