[ 
https://issues.apache.org/jira/browse/IMPALA-14552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18038813#comment-18038813
 ] 

ASF subversion and git services commented on IMPALA-14552:
----------------------------------------------------------

Commit 6810368c109f3f130c3d99e614fa26e859fb4963 in impala's branch 
refs/heads/master from Zoltan Borok-Nagy
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=6810368c1 ]

IMPALA-14552: test_show_create_table should be more strict with TBLPROPERTIES 
contents

Currently we use this regex to parse the contents of TBLPROPERTIES:

  kv_regex = "'([^\']+)'\\s*=\\s*'([^\']+)'"
  kv_results = dict(re.findall(kv_regex, map_match.group(1)))

This allows strings like:
 'X'='Y'='Z'
 'X'='Z'$'A'='B'

This means it's easy to write strings in .test files that are not valid
SQL. This patch adds a few extra checks to validate the TBLPROPERTIES
contents.

Change-Id: I94110f50720c01dc7807ee56c794d235f4990282
Reviewed-on: http://gerrit.cloudera.org:8080/23671
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Riza Suminto <[email protected]>


> test_show_create_table should be more strict with TBLPROPERTIES contents
> ------------------------------------------------------------------------
>
>                 Key: IMPALA-14552
>                 URL: https://issues.apache.org/jira/browse/IMPALA-14552
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Zoltán Borók-Nagy
>            Assignee: Zoltán Borók-Nagy
>            Priority: Major
>
> Currently we use this regex to parse the contents of TBLPROPERTIES:
> {noformat}
>   kv_regex = "'([^\']+)'\\s*=\\s*'([^\']+)'"
>   kv_results = dict(re.findall(kv_regex, map_match.group(1))){noformat}
> This allows strings like:
> {noformat}
> 'X'='Y'='Z'
> 'X'='Z'$'A'='B'{noformat}
> This means it's easy to write strings in .test files that are not valid SQL.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to