blob: 34dcd5b581b6847e5da47d16d18fee8a19746a36 [file] [log] [blame]
PREHOOK: query: DESCRIBE FUNCTION mask_last_n
PREHOOK: type: DESCFUNCTION
POSTHOOK: query: DESCRIBE FUNCTION mask_last_n
POSTHOOK: type: DESCFUNCTION
masks the last n characters of the value
PREHOOK: query: DESC FUNCTION EXTENDED mask_last_n
PREHOOK: type: DESCFUNCTION
POSTHOOK: query: DESC FUNCTION EXTENDED mask_last_n
POSTHOOK: type: DESCFUNCTION
masks the last n characters of the value
Examples:
mask_last_n(ccn, 8)
mask_last_n(ccn, 8, 'x', 'x', 'x')
Arguments:
mask_last_n(value, charCount, upperChar, lowerChar, digitChar, otherChar, numberChar)
value - value to mask. Supported types: TINYINT, SMALLINT, INT, BIGINT, STRING, VARCHAR, CHAR
charCount - number of characters. Default value: 4
upperChar - character to replace upper-case characters with. Specify -1 to retain original character. Default value: 'X'
lowerChar - character to replace lower-case characters with. Specify -1 to retain original character. Default value: 'x'
digitChar - character to replace digit characters with. Specify -1 to retain original character. Default value: 'n'
otherChar - character to replace all other characters with. Specify -1 to retain original character. Default value: -1
numberChar - character to replace digits in a number with. Valid values: 0-9. Default value: '1'
Function class:org.apache.hadoop.hive.ql.udf.generic.GenericUDFMaskLastN
Function type:BUILTIN
PREHOOK: query: explain select mask_last_n('TestString-123', 4, 'X', 'x', '0', '1')
PREHOOK: type: QUERY
PREHOOK: Input: _dummy_database@_dummy_table
#### A masked pattern was here ####
POSTHOOK: query: explain select mask_last_n('TestString-123', 4, 'X', 'x', '0', '1')
POSTHOOK: type: QUERY
POSTHOOK: Input: _dummy_database@_dummy_table
#### A masked pattern was here ####
STAGE DEPENDENCIES:
Stage-0 is a root stage
STAGE PLANS:
Stage: Stage-0
Fetch Operator
limit: -1
Processor Tree:
TableScan
alias: _dummy_table
Row Limit Per Split: 1
Select Operator
expressions: 'TestString1000' (type: string)
outputColumnNames: _col0
ListSink
PREHOOK: query: select mask_last_n('TestString-123', 4, 'X', 'x', '0', ':'),
mask_last_n(cast('TestString-123' as varchar(24)), 4, 'X', 'x', '0', ':'),
mask_last_n(cast('TestString-123' as char(24)), 4, 'X', 'x', '0', ':'),
mask_last_n(0),
mask_last_n(0, 0),
mask_last_n(0, 4, -1, -1, -1, -1, '5'),
mask_last_n(cast(123 as tinyint), 4, -1, -1, -1, -1, '5'),
mask_last_n(cast(12345 as smallint), 4, -1, -1, -1, -1, '5'),
mask_last_n(cast(12345 as int), 4, -1, -1, -1, -1, '5'),
mask_last_n(cast(12345 as bigint), 4, -1, -1, -1, -1, '5'),
mask_last_n(cast('2016-04-20' as date), 4, -1, -1, -1, -1, -1, 0, 0, 0)
PREHOOK: type: QUERY
PREHOOK: Input: _dummy_database@_dummy_table
#### A masked pattern was here ####
POSTHOOK: query: select mask_last_n('TestString-123', 4, 'X', 'x', '0', ':'),
mask_last_n(cast('TestString-123' as varchar(24)), 4, 'X', 'x', '0', ':'),
mask_last_n(cast('TestString-123' as char(24)), 4, 'X', 'x', '0', ':'),
mask_last_n(0),
mask_last_n(0, 0),
mask_last_n(0, 4, -1, -1, -1, -1, '5'),
mask_last_n(cast(123 as tinyint), 4, -1, -1, -1, -1, '5'),
mask_last_n(cast(12345 as smallint), 4, -1, -1, -1, -1, '5'),
mask_last_n(cast(12345 as int), 4, -1, -1, -1, -1, '5'),
mask_last_n(cast(12345 as bigint), 4, -1, -1, -1, -1, '5'),
mask_last_n(cast('2016-04-20' as date), 4, -1, -1, -1, -1, -1, 0, 0, 0)
POSTHOOK: type: QUERY
POSTHOOK: Input: _dummy_database@_dummy_table
#### A masked pattern was here ####
TestString:000 TestString:000 TestString-123 :::: 1 0 5 43 15555 15555 15555 0001-01-01