File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 42
42
43
43
{{ log(' hash datatype: ' ~ hash_datatype, false) }}
44
44
45
- {%- if hash_function == ' MD5' and hash_datatype == ' STRING' - %}
46
- {%- set hash_alg = ' MD5' - %}
47
- {%- set unknown_key = ' !00000000000000000000000000000000' - %}
48
- {%- set error_key = ' !ffffffffffffffffffffffffffffffff' - %}
45
+ {%- if hash_function == ' MD5' or hash_function == ' MD5_HEX' - %}
46
+ {%- if ' VARCHAR' in hash_datatype or ' CHAR' in hash_datatype or ' STRING' in hash_datatype or ' TEXT' in hash_datatype %}
47
+ {%- set hash_alg = ' MD5' - %}
48
+ {%- set unknown_key = ' !00000000000000000000000000000000' - %}
49
+ {%- set error_key = ' !ffffffffffffffffffffffffffffffff' - %}
50
+ {%- elif ' BINARY' in hash_datatype - %}
51
+ {%- set hash_alg = ' MD5_BINARY' - %}
52
+ {%- set unknown_key = " TO_BINARY('00000000000000000000000000000000')" - %}
53
+ {%- set error_key = " TO_BINARY('ffffffffffffffffffffffffffffffff')" - %}
54
+ {%- endif - %}
49
55
{%- elif hash_function == ' SHA1' or hash_function == ' SHA1_HEX' or hash_function == ' SHA' - %}
50
56
{%- if ' VARCHAR' in hash_datatype or ' CHAR' in hash_datatype or ' STRING' in hash_datatype or ' TEXT' in hash_datatype %}
51
57
{%- set hash_alg = ' SHA1' - %}
101
107
{{ return(dict_result | tojson ) }}
102
108
103
109
104
- {%- endmacro - %}
110
+ {%- endmacro - %}
You can’t perform that action at this time.
0 commit comments