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

Severin Thaler edited comment on SPARK-12266 at 12/11/15 3:08 AM:
------------------------------------------------------------------

 but this is the same error as in SPARK-10186 and there it says its indeed a 
sparksql not a JDBC issue.

the same happens btw for the PostGIS point type and likely for the polygon type 
too.


was (Author: severin thaler):
 but this is the same error as in SPARK-10186 and there it says its indeed a 
sparksql not a JDBC issue.

> cannot handle postgis raster type
> ---------------------------------
>
>                 Key: SPARK-12266
>                 URL: https://issues.apache.org/jira/browse/SPARK-12266
>             Project: Spark
>          Issue Type: Bug
>          Components: Input/Output
>    Affects Versions: 1.5.2
>         Environment: PostGIS Server:
> Ubuntu-14.04
> Postgres 9.4.5
> PostGIS 2.2.1
> Spark standalone client:
> Java 7
> Spark 1.5.2
> PostGIS JDBC driver built within java directory of PostGIS 2.1.8, see: 
> http://postgis.net/docs/manual-2.1/postgis_installation.html#idp58575520
>            Reporter: Severin Thaler
>              Labels: dataframe, postgres, sql
>
> on server postgis running with a table that has a column of type raster
> on client running spark standalone application that pulls data from postgis 
> server using and jdbc driver and spark-sql:
> {code:none}
> val conf = new SparkConf().setAppName("Simple Application").setMaster("local")
> val sc = new SparkContext(conf)
> val sqlContext = new SQLContext(sc)
> val jdbcDF = sqlContext.read.format("jdbc").options(Map("url" -> 
> "jdbc:postgresql://postgishost/test?user=postgres&password=userpassword", 
> "dbtable" -> "atlas")).load()
> val rows = jdbcDF.take(3)
> println(rows(0).toString())
> println(rows(1).toString())
> println(rows(2).toString())
> {code}
> when running this spark app i get:
> {code:java}
> java.sql.SQLException: Unsupported type 1111
>   at 
> org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$.org$apache$spark$sql$execution$datasources$jdbc$JDBCRDD$$getCatalystType(JDBCRDD.scala:103)
>   at 
> org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anonfun$1.apply(JDBCRDD.scala:140)
>   at 
> org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$$anonfun$1.apply(JDBCRDD.scala:140)
>   at scala.Option.getOrElse(Option.scala:121)
>   at 
> org.apache.spark.sql.execution.datasources.jdbc.JDBCRDD$.resolveTable(JDBCRDD.scala:139)
>   at 
> org.apache.spark.sql.execution.datasources.jdbc.JDBCRelation.<init>(JDBCRelation.scala:91)
>   at 
> org.apache.spark.sql.execution.datasources.jdbc.DefaultSource.createRelation(DefaultSource.scala:60)
>   at 
> org.apache.spark.sql.execution.datasources.ResolvedDataSource$.apply(ResolvedDataSource.scala:125)
>   at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:114)
>   at rdd.BasicRDDTests$$anonfun$1.apply$mcV$sp(BasicRDDTests.scala:65)
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to