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

Teng Qiu updated SPARK-2729:
----------------------------

    Description: 
after SPARK-2710 we can create a table in Spark SQL with ColumnType Timestamp 
from jdbc.

when i try to
{code}
sqlContext.cacheTable("myJdbcTable")
{code}

then
{code}
sqlContext.sql("select count(*) from myJdbcTable")
{code}

i got exception:

{code}
scala.MatchError: 8 (of class java.lang.Integer)
        at 
org.apache.spark.sql.columnar.ColumnBuilder$.apply(ColumnBuilder.scala:146)
{code}

i checked the code ColumnBuilder.scala:146

it is just missing a match of Timestamp typeid.

so it is easy to fix.

  was:
after SPARK-2710 we can create a table in Spark SQL with ColumnType Timestamp 
from jdbc.

when i try to sqlContext.cacheTable("myJdbcTable"), then count(*) from 
myJdbcTable, i got exception:

{code}
scala.MatchError: 8 (of class java.lang.Integer)
        at 
org.apache.spark.sql.columnar.ColumnBuilder$.apply(ColumnBuilder.scala:146)
{code}

i checked the code ColumnBuilder.scala:146

it is just missing a match of Timestamp typeid.

so it is easy to fix.


> Forgot to match Timestamp type in ColumnBuilder
> -----------------------------------------------
>
>                 Key: SPARK-2729
>                 URL: https://issues.apache.org/jira/browse/SPARK-2729
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Teng Qiu
>
> after SPARK-2710 we can create a table in Spark SQL with ColumnType Timestamp 
> from jdbc.
> when i try to
> {code}
> sqlContext.cacheTable("myJdbcTable")
> {code}
> then
> {code}
> sqlContext.sql("select count(*) from myJdbcTable")
> {code}
> i got exception:
> {code}
> scala.MatchError: 8 (of class java.lang.Integer)
>         at 
> org.apache.spark.sql.columnar.ColumnBuilder$.apply(ColumnBuilder.scala:146)
> {code}
> i checked the code ColumnBuilder.scala:146
> it is just missing a match of Timestamp typeid.
> so it is easy to fix.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to