You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Anıl Chalil (JIRA)" <ji...@apache.org> on 2015/12/19 13:24:46 UTC

[jira] [Updated] (CALCITE-1031) calling CsvScannableTable twice

     [ https://issues.apache.org/jira/browse/CALCITE-1031?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anıl Chalil updated CALCITE-1031:
---------------------------------
    Attachment: threads_report2.txt
                threads_report.txt

I attached two files which include stack traces at the time scan is called

> calling CsvScannableTable twice
> -------------------------------
>
>                 Key: CALCITE-1031
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1031
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica
>    Affects Versions: 1.5.0
>         Environment: jdk 1.8.0_20 linux mint 17.3
>            Reporter: Anıl Chalil
>            Assignee: Julian Hyde
>            Priority: Minor
>         Attachments: threads_report.txt, threads_report2.txt
>
>
> Hi,
> I just noticed something when i am playing with examples. 
>   Class.forName("org.apache.calcite.jdbc.Driver")
>   val properties: Properties = new Properties()
>   properties.setProperty("caseSensitive","true")
>   val connection = DriverManager.getConnection("jdbc:calcite:", properties)
>   val calciteConnection=connection.unwrap(classOf[CalciteConnection])
>   val schema= (new CsvSchemaFactory()).create(calciteConnection.getRootSchema,null,Map[String,AnyRef]("directory" -> "src/main/resources/csv","flavor" -> "scannable").asJava)
>   calciteConnection.getRootSchema.add("TEST",schema)
>   val statement2=calciteConnection.prepareStatement("select \"tarih\" from \"TEST\".\"timeseries\" where \"sensor\" = ?")
>   statement2.setString(1,"sensor38")
>   val resultSet1=statement2.executeQuery()
>   while(resultSet1.next())
>     println(resultSet1.getString("tarih"))
> My example like above. But when i call executeQuery  i noticed that CsvScannableTable.scan called twice and enumerator iterating on values. When i inspected stacktraces i found that one of the call come from AvaticaConnection.java:463 and the other one  is AvaticaConnection:489 . 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)