You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Denys Ordynskiy (JIRA)" <ji...@apache.org> on 2019/07/08 13:38:00 UTC
[jira] [Created] (DRILL-7320) DATA_READ ERROR when querying
TIMESTAMP data from csvh using Schema Provision file
Denys Ordynskiy created DRILL-7320:
--------------------------------------
Summary: DATA_READ ERROR when querying TIMESTAMP data from csvh using Schema Provision file
Key: DRILL-7320
URL: https://issues.apache.org/jira/browse/DRILL-7320
Project: Apache Drill
Issue Type: Bug
Affects Versions: 1.16.0
Reporter: Denys Ordynskiy
Assignee: Arina Ielchiieva
*Description:*
Set CTAS output format to 'csvh':
{noformat}
set `store.format` = 'csvh'
{noformat}
Create csvh table with timestamp string:
{noformat}
drop table if exists dfs.tmp.`employee_test`
create table dfs.tmp.`employee_test` as select
hire_date
from cp.`employee.json` LIMIT 2
{noformat}
Run the query without INFORMATION SCHEMA file using cast():
{noformat}
set `store.table.use_schema_file` = false
select
cast(hire_date as TIMESTAMP) as hire_date
from dfs.tmp.`employee_test`
{noformat}
|hire_date|
|1994-12-01T00:00|
|1994-12-01T00:00|
Create Schema Provision file:
{noformat}
create schema (
hire_date TIMESTAMP
) for table dfs.tmp.`employee_test`
{noformat}
Run the query using Schema Provision file:
{noformat}
alter system set `store.table.use_schema_file` = true
select
cast(hire_date as TIMESTAMP) as hire_date
from dfs.tmp.`employee_test`
{noformat}
*Expected result:*
|hire_date|
|1994-12-01T00:00|
|1994-12-01T00:00|
*Actual result:*
{color:#d04437}UserRemoteException : DATA_READ ERROR: Invalid format: "1994-12-01 00:00:00.0" is malformed at " 00:00:00.0"
org.apache.drill.common.exceptions.UserRemoteException: DATA_READ ERROR: Invalid format: "1994-12-01 00:00:00.0" is malformed at " 00:00:00.0"
Line 2
Record 0
Fragment 0:0
[Error Id: 06965d3f-55ba-4c76-9c41-c4095f0c4445 on localhost:31010]{color}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)