Csaba Ringhofer has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/15475 )

Change subject: IMPALA-9492: Fix test_unescaped_string_partition failing on S3
......................................................................


Patch Set 2: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/15475/2/tests/metadata/test_recover_partitions.py
File tests/metadata/test_recover_partitions.py:

http://gerrit.cloudera.org:8080/#/c/15475/2/tests/metadata/test_recover_partitions.py@366
PS2, Line 366:     double_quote = '"'
             :     single_quote = "'"
             :     back_slash = '\\'
             :     char_to_ascii_hex = {
             :       double_quote: '%22',
             :       single_quote: '%27',
             :       back_slash: '%5C'
             :     }
             :     parts = [
             :       single_quote,
             :       double_quote,
             :       back_slash + single_quote,
             :       back_slash + double_quote,
             :       back_slash + back_slash + single_quote,
             :       back_slash + back_slash + double_quote
             :     ]
             :     for i in range(len(parts)):
             :       # When creating partitions, Hive converts special 
characters to their ascii values
             :       # in Hex. So we should follow the same rule in creating 
partition directories.
             :       hex_part = ''.join([char_to_ascii_hex[c] for c in 
parts[i]])
             :       self.create_fs_partition(tbl_location, 'p=%s' % hex_part, 
'file_%d' % i, str(i)
optional: we could also call urllib.parse.quote() in create_fs_partition() or 
even in the filesystem_client



--
To view, visit http://gerrit.cloudera.org:8080/15475
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I63d149c9bdec52c2e1c0b25c8c3f0448cf7bdadb
Gerrit-Change-Number: 15475
Gerrit-PatchSet: 2
Gerrit-Owner: Quanlong Huang <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Quanlong Huang <[email protected]>
Gerrit-Comment-Date: Wed, 18 Mar 2020 14:16:27 +0000
Gerrit-HasComments: Yes

Reply via email to