You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Mehant Baid (JIRA)" <ji...@apache.org> on 2013/11/23 07:27:35 UTC

[jira] [Commented] (DRILL-307) Remove _MAP[] from Drill SQL

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

Mehant Baid commented on DRILL-307:
-----------------------------------

There are couple of known issues with this iteration of the patch. Tracked as separate JIRA's : https://issues.apache.org/jira/browse/DRILL-308 , https://issues.apache.org/jira/browse/DRILL-310

> Remove _MAP[] from Drill SQL
> ----------------------------
>
>                 Key: DRILL-307
>                 URL: https://issues.apache.org/jira/browse/DRILL-307
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Mehant Baid
>            Assignee: Mehant Baid
>         Attachments: DRILL-307.patch
>
>
> Currently while executing SQL we need to use _MAP['columnname'] in the select statements. 
> The problem while using select statements with columnnames instead of _MAP['columnname'] is that Optiq tries to verify that these columns exist in the schema and raises validation errors. 
> The way we've solved the problem is to override the 'rowtype' returned to Optiq while creating a Drill table. We have defined a new class RelDataTypeDrillImpl which is the 'rowtype' returned to Optiq and will be invoked for any validation purposes. RelDataTypeDrillImpl always returns true when queried if a certain field exists in the table, with its type as 'ANY'. This gets us past the validation in Optiq and allows us to use column names directly in select statements. 



--
This message was sent by Atlassian JIRA
(v6.1#6144)