Christian created DRILL-7892:
--------------------------------

             Summary: Parameter not working
                 Key: DRILL-7892
                 URL: https://issues.apache.org/jira/browse/DRILL-7892
             Project: Apache Drill
          Issue Type: Test
          Components: Client - ODBC
    Affects Versions: 1.18.0
            Reporter: Christian


Hi,

I'm accessing Drill (Docker version) through the MapR/Odbc driver (from within 
C# with Dapper). All works great but supplying parameters does not. I'm copied 
the code below but maybe this is a broader question as to whether parameters 
are supported at all - I was not able to find any documentation regarding that.

var tmpIndex = (await connection.QueryAsync<DataPoint>(@" var tmpIndex = (await 
connection.QueryAsync<DataPoint>(@" SELECT dir0 AS parquetindex, dealkey, 
rundate AS `date`, value FROM 
dfs.`/mnt/linuxshare/blazortest/20210331/mergepervariable` WHERE value IS NOT 
NULL AND dir0=@id LIMIT 1 ", new \{ id = 1 })).ToList();

The error I'm getting is this:

[30038]Query execution error. Details:[ PARSE ERROR: Lexical error at line 4, 
column 37.  Encountered: "@" (64), after : ""
SQL Query:  SELECT dir0 AS parquetindex, dealkey, rundate AS `date`, value FROM 
dfs.`/mnt/linuxshare/blazortest/20210331/mergepervariable` WHERE value IS NOT 
NULL AND dir0=@id                                    ^ LIMIT 1

 

I tried multiple ways of specifying the parameter (e.g. placeholder through ?) 
- the error message changes but it never succeeds.

 

Any insight whether this is even doable would be appreciated.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to