Skip to content

Instantly share code, notes, and snippets.

View susanctu's full-sized avatar

susanctu

  • San Francisco
View GitHub Profile
{
"queryPlans":[{
"query_type":"join",
"relations":[{
"name":"Edge",
"ordering":[0,1],
"annotation":"int"
}],
"output":{
"name":"Barbell",
{
"queryPlans":[{
"query_type":"join",
"relations":[{
"name":"Edge",
"ordering":[0,1],
"annotation":"int"
},{
"name":"Edge",
"ordering":[1,0],
{
"queryPlans":[{
"query_type":"join",
"relations":[{
"name":"Edge",
"ordering":[0,1],
"annotation":"int"
},{
"name":"Edge",
"ordering":[1,0],
{
"queryPlans":[{
"query_type":"join",
"relations":[{
"name":"Edge",
"ordering":[0,1],
"annotation":"void*"
},{
"name":"Edge",
"ordering":[1,0],
if last materialized
if exists aggregated selected attr
prev agg
else if exists aggregated attr
next agg
else
“None
else
“None"
package org.apache.spark.examples.sql
import org.apache.spark.sql.SQLContext
import org.apache.spark.{SparkContext, SparkConf}
/**
* Created by sctu on 2/1/16.
*/
object ColumnTriangleNPRRExample {
def main(args: Array[String]) {
{
"queryPlans":[{
"query_type":"join",
"relations":[{
"name":"R1",
"ordering":[0,1],
"annotation":"void*"
},{
"name":"R0",
"ordering":[0],
{
"queryPlans":[{
"query_type":"join",
"relations":[{
"name":"Edge",
"ordering":[1,0],
"annotation":"void*"
}],
"output":{
"name":"result",
N(;w:int):-S(x,y);w=[<<COUNT(x)>>].
PageRank(x;y:float):-S(x ,z );y=[(1/N)*<<CONST(z;1)>>].
PageRank (x;y:float)*[i=5]:-S(x,z),PageRank(z),InvDeg(z);y=[0.15+0.85*<<SUM(z)>>].
{
"queryPlans":[{
"query_type":"join",
"relations":[{
"name":"S",
"ordering":[0,1],
"annotation":"void*"
}],
"output":{
"name":"N",