You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Severin Thaler (JIRA)" <ji...@apache.org> on 2015/12/11 04:01:11 UTC

[jira] [Issue Comment Deleted] (SPARK-12266) cannot handle postgis raster type

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

Severin Thaler updated SPARK-12266:
-----------------------------------
    Comment: was deleted

(was: yes, not spark is to blame but the jdbc postgis driver.
ill file a bug report there. thanks)

> 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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org