You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Iulian Tirzuman (JIRA)" <ji...@apache.org> on 2018/07/31 12:45:00 UTC

[jira] [Created] (DRILL-6648) Unknown column types not being handled

Iulian Tirzuman created DRILL-6648:
--------------------------------------

             Summary: Unknown column types not being handled
                 Key: DRILL-6648
                 URL: https://issues.apache.org/jira/browse/DRILL-6648
             Project: Apache Drill
          Issue Type: Bug
    Affects Versions: 1.13.0
            Reporter: Iulian Tirzuman
         Attachments: sql type -150.jpg

I've compiled Drill 1.13, installed SQL Server (Microsoft SQL Server 2017 (RTM-CU9) (KB4341265) - 14.0.3030.27 (X64)) and then created a plugin in drill to use that SQL Server instance.

When I try to run the query "SELECT * FROM `INFORMATION_SCHEMA`.`COLUMNS`" from drill explorer I get the following error:

ERROR [HY000] [MapR][Drill] (1040) Drill failed to execute the query: SELECT * FROM `INFORMATION_SCHEMA`.`COLUMNS`
[30034]Query execution error. Details:[ 
SYSTEM ERROR: IllegalArgumentException: Unknown SQL type -150

Fragment 0:0

[Error Id: 47625973-9d73-4812-9c91-771d81addc73 on localhost:31010]
]
 at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
 at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader, Object[] methodArguments, SQL_API odbcApiMethod)
 at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method, Boolean needReader)
 at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior)
 at DrillExplorer.DROdbcProvider.GetStatmentColumns(String in_query)

 

I've did some debugging and saw that the error is due to the sql server column type sql_variant of table SEQUENCES , column START_VALUE which has the dataType -150 and the code "SqlType.valueOf(dataType)" fails because it doesn't contain it; it should at least configurable to be defaulted to a a default sql type ?

I've attached also a screenshot with the debug before the error occurs.

I've used sqljdbc42.jar as the JDBC driver to connect to SQL Server.

I've also compiled and tested the above in Drill 1.14 and the issue is still present.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)