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

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

    [ https://issues.apache.org/jira/browse/DRILL-6648?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16563655#comment-16563655 ] 

Arina Ielchiieva commented on DRILL-6648:
-----------------------------------------

This problem occurs in Apache Calcite, please see package of JDBC schema {{org.apache.calcite.adapter.jdbc}}. Also you'll see that {{SqlType}} that has full list of supported types which also is defined in Calcite. I suggest you file Jira in Apache Calcite for the fix. I don't think Apache Drill can doing anything about it.

> 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
>            Priority: Major
>         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)