[ 
https://issues.apache.org/jira/browse/IMPALA-6260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tim Armstrong updated IMPALA-6260:
----------------------------------
    Priority: Minor  (was: Major)

> Misleading 'NULL' string literal in expected results of E2E tests
> -----------------------------------------------------------------
>
>                 Key: IMPALA-6260
>                 URL: https://issues.apache.org/jira/browse/IMPALA-6260
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Infrastructure
>            Reporter: Jin Chul Kim
>            Priority: Minor
>              Labels: newbie, test-framework
>
> Our test framework always adds single quotes if the result type is string or 
> char. It makes the potential problems.
> 1. The regression test cannot distinguish between 'NULL' string literal and 
> NULL.
> 2. It makes a developer confuse because 'NULL' is totally different NULL.
> When I look through the relevant code, I think the following code should be 
> maintained.
> {panel:title=tests/common/test_result_verifier.py}
> {noformat}
> def parse_result_rows(exec_result):
>   ...
>   for row in exec_result.data:
>     ...
>     for i in xrange(len(cols)):
>       if col_types[i] == 'STRING' or col_types[i] == 'CHAR':
>         col = cols[i].encode('unicode_escape')
>         new_cols.append("'%s'" % col)
>         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>       else:
>         new_cols.append(cols[i])
>     result.append(','.join(new_cols))
> {noformat}
> {panel}
> The problematic code was introduced with the commit ef48f65e. Please consider 
> "how to distinguish NULL and 'NULL' string literal" when you fix this problem.
> Dan Hecht mentioned [it might be a known 
> issue|https://gerrit.cloudera.org/#/c/8629/4/testdata/workloads/functional-query/queries/QueryTest/exprs.test],
>  so please mark it as a duplicate if you find a original ticket. I also tried 
> to find it using the options(
> i.e. project = IMPALA AND description ~ 'NULL' and component = 
> Infrastructure), but I couldn't find.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to