[
https://issues.apache.org/jira/browse/DRILL-4862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15437209#comment-15437209
]
Jinfeng Ni commented on DRILL-4862:
-----------------------------------
The same behavior was seen on 1.7.0.
{code}
select convert_from(binary_string(key),'UTF8') from `f1.json`;
+---------+
| EXPR$0 |
+---------+
| 0123 |
| 4567 |
| 8901 |
| 0000 |
| 1111 |
| 5555 |
| 8888 |
| 9999 |
| ABCD |
| EFGH |
| IADF |
| JKLM |
| WXYZ |
| NOPQ |
| FFFF |
+---------+
15 rows selected (1.344 seconds)
0: jdbc:drill:zk=local> select convert_from(binary_string(key),'UTF8') from
`f1.json` where convert_from(binary_string(key),'UTF8') is not null;
+----------+
| EXPR$0 |
+----------+
| 0123123 |
| 4567567 |
| 8901901 |
| 0000000 |
| 1111111 |
| 5555555 |
| 8888888 |
| 9999999 |
| ABCDBCD |
| EFGHFGH |
| IADFADF |
| JKLMKLM |
| WXYZXYZ |
| NOPQOPQ |
| FFFFFFF |
+----------+
15 rows selected (0.419 seconds)
0: jdbc:drill:zk=local> select * from sys.version;
+---------+-----------+----------------+-------------+-------------+------------+
| version | commit_id | commit_message | commit_time | build_email | build_time
|
+---------+-----------+----------------+-------------+-------------+------------+
| 1.7.0-SNAPSHOT | 6286c0a4b8e39524fe00d623152d1d38db15774f | DRILL-4694: CTAS
in JSON format produces extraneous NULL fields Changed behavior of JSON CTAS to
skip fields if the value is null. Added an option
"store.json.writer.skip_null_fields" to enable old behavior. | 07.06.2016 @
10:06:53 PDT | [email protected] | 14.06.2016 @ 17:12:36 PDT |
+---------+-----------+----------------+-------------+-------------+------------+
{code}
> wrong results - use of convert_from(binary_string(key),'UTF8') in filter
> results in wrong results
> -------------------------------------------------------------------------------------------------
>
> Key: DRILL-4862
> URL: https://issues.apache.org/jira/browse/DRILL-4862
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Flow
> Affects Versions: 1.8.0
> Environment: 4 node cluster CentOS
> Reporter: Khurram Faraaz
>
> These results do not look right, i.e when the predicate has
> convert_from(binary_string(key),'UTF8')
> Apache drill 1.8.0-SNAPSHOT git commit ID: 57dc9f43
> {noformat}
> [root@centos-0x drill4478]# cat f1.json
> {"key":"\\x30\\x31\\x32\\x33"}
> {"key":"\\x34\\x35\\x36\\x37"}
> {"key":"\\x38\\x39\\x30\\x31"}
> {"key":"\\x30\\x30\\x30\\x30"}
> {"key":"\\x31\\x31\\x31\\x31"}
> {"key":"\\x35\\x35\\x35\\x35"}
> {"key":"\\x38\\x38\\x38\\x38"}
> {"key":"\\x39\\x39\\x39\\x39"}
> {"key":"\\x41\\x42\\x43\\x44"}
> {"key":"\\x45\\x46\\x47\\x48"}
> {"key":"\\x49\\x41\\x44\\x46"}
> {"key":"\\x4a\\x4b\\x4c\\x4d"}
> {"key":"\\x57\\x58\\x59\\x5a"}
> {"key":"\\x4e\\x4f\\x50\\x51"}
> {"key":"\\x46\\x46\\x46\\x46"}
> {noformat}
> results without the predicate - these are correct results
> {noformat}
> 0: jdbc:drill:schema=dfs.tmp> select convert_from(binary_string(key),'UTF8')
> from `f1.json`;
> +---------+
> | EXPR$0 |
> +---------+
> | 0123 |
> | 4567 |
> | 8901 |
> | 0000 |
> | 1111 |
> | 5555 |
> | 8888 |
> | 9999 |
> | ABCD |
> | EFGH |
> | IADF |
> | JKLM |
> | WXYZ |
> | NOPQ |
> | FFFF |
> +---------+
> 15 rows selected (0.256 seconds)
> {noformat}
> results with a predicate - these results don't look correct
> {noformat}
> 0: jdbc:drill:schema=dfs.tmp> select convert_from(binary_string(key),'UTF8')
> from `f1.json` where convert_from(binary_string(key),'UTF8') is not null;
> +----------+
> | EXPR$0 |
> +----------+
> | 0123123 |
> | 4567567 |
> | 8901901 |
> | 0000000 |
> | 1111111 |
> | 5555555 |
> | 8888888 |
> | 9999999 |
> | ABCDBCD |
> | EFGHFGH |
> | IADFADF |
> | JKLMKLM |
> | WXYZXYZ |
> | NOPQOPQ |
> | FFFFFFF |
> +----------+
> 15 rows selected (0.279 seconds)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)