Quanlong Huang 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 3:

(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:         self.client, "CREATE TABLE %s (i int) PARTITIONED BY (p 
string)" % fq_tbl_name)
             :     double_quote = '"'
             :     single_quote = "'"
             :     back_slash = '\\'
             :     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 partition directories, Hive replaces 
special characters in
             :       # partition value string using the %xx escape. e.g. p=' 
will become p=%27.
             :       hex_part = urllib.parse.quote(parts[i])
             :       self.create_fs_partition(tbl_location, 'p=%s' % hex_part, 
'file_%d' % i, str(i))
             :
             :     self.execute_query_expect_success(
             :         self.client, "ALTER TABLE %s RECOVER PARTITIONS" % 
fq_tbl_name)
             :     result = self.execute_query_expect_success(
> optional: we could also call urllib.parse.quote() in create_fs_partition()
Good point! Change these to use six.moves.urllib.parse.quote() in this test. 
Using it in create_fs_partition() will incorrectly quote the '=', i.e. p=' 
becomes p%3D%27 but not p=%27.



--
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: 3
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: Thu, 19 Mar 2020 03:32:16 +0000
Gerrit-HasComments: Yes

Reply via email to