orientechnologies / spark-orientdb

Apache Spark datasource for OrientDB
Other
19 stars 11 forks source link

Error on handling 'in' and 'out' properties on edges. #15

Open Dollyn opened 6 years ago

Dollyn commented 6 years ago

When creating edge class, if you specify the 'from vertex' or 'to vertex' class type: image Orientdb will create a 'in' property and a 'out' property with type 'LINK': image

OrientDBGraphEdgeWrapper can't handle these properties properly:

Exception in thread "main" scala.MatchError: LINK (of class com.orientechnologies.orient.core.metadata.schema.OType) at org.apache.spark.orientdb.graphs.OrientDBGraphWrapper.getCatalystType(OrientDBGraphWrapper.scala:39) at org.apache.spark.orientdb.graphs.OrientDBGraphEdgeWrapper.resolveTable(OrientDBGraphWrapper.scala:433) at org.apache.spark.orientdb.graphs.OrientDBEdgeRelation$$anonfun$schema$2.apply(OrientDBRelation.scala:163) at org.apache.spark.orientdb.graphs.OrientDBEdgeRelation$$anonfun$schema$2.apply(OrientDBRelation.scala:158) at scala.Option.getOrElse(Option.scala:121)

sbcd90 commented 6 years ago

Unfortunately, only EmbeddedList, EmbeddedSet, EmbeddedMap, LinkList, LinkSet, LinkMap, LinkBag types are supported as of now. I'll add support for Link.

sbcd90 commented 6 years ago

hello @Dollyn , i have added support for linktypes. This issue should be fixed now.

237693991 commented 5 years ago

@sbcd90 could you add linktypes support for spark 1.6 , thanks