en:site:recherche:logiciels:sparqlwithspark:watdivf5
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:site:recherche:logiciels:sparqlwithspark:watdivf5 [14/09/2016 14:56] – hubert | en:site:recherche:logiciels:sparqlwithspark:watdivf5 [16/09/2016 23:07] (current) – [WatDiv Query F5 plans] hubert | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Query F5 ====== | + | {{indexmenu_n> |
- | SPARQL Hybrid DF plan | + | |
+ | ====== | ||
+ | |||
+ | === SPARQL Hybrid DF plan === | ||
+ | |||
+ | <code scala> | ||
+ | // First triple pattern | ||
+ | val retailer = getIdSO(" | ||
+ | val idP1 = getIdP(" | ||
+ | val s1 = List( | ||
+ | (" | ||
+ | (" | ||
+ | (" | ||
+ | val s2 = List( | ||
+ | (" | ||
+ | (" | ||
+ | |||
+ | |||
+ | val subset = df.where(s" | ||
+ | subset.count | ||
+ | val DATA = subset | ||
+ | |||
+ | val tp1 = DATA.where(s" | ||
+ | val e1 = sc.parallelize(1 to NB_FRAGMENTS, | ||
+ | val tp1a = t1.unionAll(e1) | ||
+ | |||
+ | val l1 = s1.map{case(ns, | ||
+ | val idP = getIdP(ns, p) | ||
+ | DATA.where(s" | ||
+ | |||
+ | val l2 = s2.map{case(ns, | ||
+ | val idP = getIdP(ns, p) | ||
+ | DATA.where(s" | ||
+ | |||
+ | val v1 = getIdP(" | ||
+ | val snf1 = tp1a.join(l1(0)," | ||
+ | |||
+ | val query = snf1.join(l2(0)," | ||
+ | |||
+ | </ | ||
+ | |||
+ | === S2RDF plan === | ||
+ | |||
+ | <code scala> | ||
+ | val VP2EXP=VP2Random | ||
+ | |||
+ | val tp1 = VP2EXP(getIdP(" | ||
+ | |||
+ | val l1 = s1.map{case(ns, | ||
+ | val idP = getIdP(ns, p) | ||
+ | VP2EXP(idP).withColumnRenamed(" | ||
+ | |||
+ | val v1 = getIdP(" | ||
+ | val snf1 = tp1.join(l1(0)," | ||
+ | |||
+ | val l2 = s2.map{case(ns, | ||
+ | val idP = getIdP(ns, p) | ||
+ | VP2EXP(idP).withColumnRenamed(" | ||
+ | |||
+ | val query = snf1.join(l2(0)," | ||
+ | |||
+ | </ | ||
+ | |||
+ | === S2RDF + Hybrid plan === | ||
+ | |||
+ | |||
+ | <code scala> | ||
+ | val VP2EXP=VP2Subject | ||
- | < | ||
val s1 = List( | val s1 = List( | ||
(" | (" | ||
Line 16: | Line 82: | ||
val e1 = sc.parallelize(1 to NB_FRAGMENTS, | val e1 = sc.parallelize(1 to NB_FRAGMENTS, | ||
val tp1a = tp1.unionAll(e1) | val tp1a = tp1.unionAll(e1) | ||
- | |||
val l1 = s1.map{case(ns, | val l1 = s1.map{case(ns, | ||
Line 32: | Line 97: | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
+ | Go to [[en: | ||
+ |
en/site/recherche/logiciels/sparqlwithspark/watdivf5.1473857774.txt.gz · Last modified: by hubert