Vivian Summers created DRILL-863:
------------------------------------

             Summary: query returns incorrect data when columns selected in the 
reverse order of their existence in the view
                 Key: DRILL-863
                 URL: https://issues.apache.org/jira/browse/DRILL-863
             Project: Apache Drill
          Issue Type: Bug
            Reporter: Vivian Summers


I have a view beacon_aster, uid column appears before country and this works 
fine:
: jdbc:drill:schema=dfs> SELECT uid, country FROM beacon_aster limit 1;
+------------+------------+
|    uid     |  country   |
+------------+------------+
| 937021026  | US         |
+------------+------------+
1 row selected (6.52 seconds)

But if select country first, it returns other columns after uid:
0: jdbc:drill:schema=dfs> SELECT country, uid FROM beacon_aster limit 1;
+------------+------------+
|  country   |    uid     |
+------------+------------+
| US         | 937021026        2816d925-6902-2014-8017-113468677480    
2012-09-25 00:00:27.132 20120906.02     60f2761d0e6192a88305054eb06877cb        
1       -8      US      9 |

Some cases it throws error:
This works:
0: jdbc:drill:schema=dfs> SELECT recorded, country FROM beacon_aster limit 1;
+------------+------------+
|  recorded  |  country   |
+------------+------------+
| 2012-09-25T00:00:27.132-07:00 | US         |
+------------+------------+
1 row selected (8.279 seconds)

But this throws IllegalArgumentException, recorded columns appears before 
country column:

0: jdbc:drill:schema=dfs> SELECT country, recorded FROM beacon_aster limit 1;
Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while 
running query.[error_id: "4cd5263c-039d-4e04-a4c7-2b31c5bd4139"
endpoint {
  address: "mfs101.qa.lab"
  user_port: 31010
  control_port: 31011
  data_port: 31012
}
error_type: 0
message: "Failure while running fragment. < IllegalArgumentException:[ Invalid 
format: "2012-09-25 00:00:27.132 20120906.02     60f2761d0e6192a8830..." is 
malformed at "       20120906.02     60f2761d0e6192a8830..." ]"
]
Error: exception while executing query (state=,code=0)




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to