Bases de Données / Databases

Site Web de l'équipe BD du LIP6 / LIP6 DB Web Site

User Tools

Site Tools


en:site:recherche:logiciels:sparqlwithspark:chain6

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:site:recherche:logiciels:sparqlwithspark:chain6 [14/09/2016 14:42]
hubert
en:site:recherche:logiciels:sparqlwithspark:chain6 [16/09/2016 23:11] (current)
hubert [Chain6 query plans]
Line 1: Line 1:
 +{{indexmenu_n>​7}}
 +
 ====== Chain6 query plans ====== ====== Chain6 query plans ======
  
 The plans produced by each method are: The plans produced by each method are:
   * SPARQL RDD:   * SPARQL RDD:
-<​code>​+<​code ​scala>
 val d1 = triples.filter{case(s,​(p,​o))=>​ p==P1}.map{case(x1,​(p,​ x2))=> (x2, x1)} val d1 = triples.filter{case(s,​(p,​o))=>​ p==P1}.map{case(x1,​(p,​ x2))=> (x2, x1)}
 val d2 = triples.filter{case(s,​(p,​o))=>​ p==P2}.mapValues{case(p,​x3) => x3} val d2 = triples.filter{case(s,​(p,​o))=>​ p==P2}.mapValues{case(p,​x3) => x3}
Line 19: Line 21:
  
   * SPARQL DF:   * SPARQL DF:
-<​code>​+<​code ​scala>
 val t1 = df.where(s"​p =$P1"​).select("​s","​o"​).withColumnRenamed("​s",​ "​x1"​).withColumnRenamed("​o",​ "​x2"​) val t1 = df.where(s"​p =$P1"​).select("​s","​o"​).withColumnRenamed("​s",​ "​x1"​).withColumnRenamed("​o",​ "​x2"​)
 val t2 = df.where(s"​p=$P2"​).select("​s","​o"​).withColumnRenamed("​s",​ "​x2"​).withColumnRenamed("​o",​ "​x3"​) val t2 = df.where(s"​p=$P2"​).select("​s","​o"​).withColumnRenamed("​s",​ "​x2"​).withColumnRenamed("​o",​ "​x3"​)
Line 31: Line 33:
  
   * SPARQL Hybrid DF:   * SPARQL Hybrid DF:
-<​code>​+<​code ​scala>
 val subg = df.where(s"​p in ($P1, $P2, $P3, $P4, $P5, $P6)") val subg = df.where(s"​p in ($P1, $P2, $P3, $P4, $P5, $P6)")
 subg.persist subg.persist
en/site/recherche/logiciels/sparqlwithspark/chain6.1473856940.txt.gz · Last modified: 14/09/2016 14:42 by hubert