Lunen created DRILL-4422: ---------------------------- Summary: Selecting from views which contains a datetime format, fails. Key: DRILL-4422 URL: https://issues.apache.org/jira/browse/DRILL-4422 Project: Apache Drill Issue Type: Bug Affects Versions: 1.5.0 Reporter: Lunen
I'm creating views pointing to a Microsoft SQL Database. It seems as though Drill is passing a query to the SQL Database containing a CAST as TIMESTAMP function for all datetime fields. I've tested other versions of Microsoft SQL databases as well. Obviously this type of cast will not working in MS-SQL. ====MY VIEW CREATE==== CREATE VIEW dfs.views.TEST1 AS ( SELECT abr, abr_def, rec_cre_dte FROM MSSQLv2.`dbo`.[dev_sys_abr] AS SQLv2_dev_sys_abr ====MY SELECT STATEMENT==== Select * from dfs.views.TEST1; ====ERROR==== org.apache.drill.common.exceptions.UserRemoteException: DATA_READ ERROR: The JDBC storage plugin failed while trying setup the SQL query. sql SELECT "abr", "abr_def", CAST("rec_cre_dte" AS TIMESTAMP(0)) AS "rec_cre_dte" FROM "dbo"."dev_sys_abr" plugin MSSQLv2 Fragment 0:0 [Error Id: 456e8beb-00eb-4ee3-b90c-32aca37dfaa4 on localhost:31010] -- This message was sent by Atlassian JIRA (v6.3.4#6332)