Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save EncodePanda/d9ea0c75cb93222d9ee276a49c5291f5 to your computer and use it in GitHub Desktop.

Select an option

Save EncodePanda/d9ea0c75cb93222d9ee276a49c5291f5 to your computer and use it in GitHub Desktop.
select profile from `user_comments.data` where (profile.title LIKE "%Dr%" OR comments[*].id LIKE "%Dr%")
QScript (Spark):
Map
├─ Subset(Take)
│ ├─ Unreferenced
│ ├─ From
│ │ ╰─ Filter
│ │ ├─ LeftShift
│ │ │ ├─ Map
│ │ │ │ ├─ ShiftedRead(ShiftedRead(/Users/rabbit/projects/quasar/it/src/main/resources/tests/user_comments.data, IncludeId))
│ │ │ │ ╰─ ConcatArrays
│ │ │ │ ├─ MakeArray
│ │ │ │ │ ╰─ ConcatArrays
│ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ ├─ MakeArray
│ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ ╰─ ConcatArrays
│ │ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ │ │ ├─ MakeArray
│ │ │ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ ╰─ Undefined
│ │ │ │ ╰─ MakeArray
│ │ │ │ ╰─ ConcatArrays
│ │ │ │ ├─ MakeArray
│ │ │ │ │ ╰─ ConcatArrays
│ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ ├─ MakeArray
│ │ │ │ │ │ │ ╰─ ConcatArrays
│ │ │ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ │ │ ├─ MakeArray
│ │ │ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ ╰─ ConcatArrays
│ │ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ │ │ ├─ MakeArray
│ │ │ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ │ ╰─ ConcatArrays
│ │ │ │ │ │ │ │ ├─ MakeArray
│ │ │ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ ╰─ ProjectField
│ │ │ │ │ │ │ ├─ Guard
│ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ │ ├─ Type(Obj(Map[], Some(Top)))
│ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ │ ╰─ Undefined
│ │ │ │ │ │ │ ╰─ Constant(Str(profile))
│ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ ╰─ Guard
│ │ │ │ │ │ ├─ ProjectField
│ │ │ │ │ │ │ ├─ ProjectField
│ │ │ │ │ │ │ │ ├─ Guard
│ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ │ │ ├─ Type(Obj(Map[], Some(Top)))
│ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ │ │ ╰─ Undefined
│ │ │ │ │ │ │ │ ╰─ Constant(Str(profile))
│ │ │ │ │ │ │ ╰─ Constant(Str(title))
│ │ │ │ │ │ ├─ Type(Str)
│ │ │ │ │ │ ├─ Search
│ │ │ │ │ │ │ ├─ ProjectField
│ │ │ │ │ │ │ │ ├─ ProjectField
│ │ │ │ │ │ │ │ │ ├─ Guard
│ │ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ │ │ │ ├─ Type(Obj(Map[], Some(Top)))
│ │ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ │ │ │ ╰─ Undefined
│ │ │ │ │ │ │ │ │ ╰─ Constant(Str(profile))
│ │ │ │ │ │ │ │ ╰─ Constant(Str(title))
│ │ │ │ │ │ │ ├─ Constant(Str(^.*Dr.*$))
│ │ │ │ │ │ │ ╰─ Constant(Bool(false))
│ │ │ │ │ │ ╰─ Undefined
│ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ ╰─ Undefined
│ │ │ │ ╰─ MakeArray
│ │ │ │ ╰─ ConcatArrays
│ │ │ │ ├─ ConcatArrays
│ │ │ │ │ ├─ MakeArray
│ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ ╰─ ConcatArrays
│ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ │ ├─ MakeArray
│ │ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ ╰─ ProjectField
│ │ │ │ │ │ ├─ Guard
│ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ ├─ Type(Obj(Map[], Some(Top)))
│ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ ╰─ Undefined
│ │ │ │ │ │ ╰─ Constant(Str(comments))
│ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ ╰─ ProjectField
│ │ │ │ │ ├─ Guard
│ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ ├─ Type(Obj(Map[], Some(Top)))
│ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ ╰─ Undefined
│ │ │ │ │ ╰─ Constant(Str(comments))
│ │ │ │ ╰─ MakeArray
│ │ │ │ ╰─ Undefined
│ │ │ ├─ Struct
│ │ │ │ ╰─ Guard
│ │ │ │ ├─ ProjectIndex
│ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ ╰─ Constant(Int(2))
│ │ │ │ ├─ Type(FlexArr(0, None, Obj(Map[], Some(Top))))
│ │ │ │ ├─ ProjectIndex
│ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ ╰─ Constant(Int(3))
│ │ │ │ ╰─ ProjectIndex
│ │ │ │ ├─ ProjectIndex
│ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ ├─ ○
│ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ ╰─ Constant(Int(2))
│ │ │ ├─ IdStatus
│ │ │ │ ╰─ IdStatus(IncludeId)
│ │ │ ╰─ Repair
│ │ │ ╰─ ConcatArrays
│ │ │ ├─ ConcatArrays
│ │ │ │ ├─ ConcatArrays
│ │ │ │ │ ├─ MakeArray
│ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ LeftSide
│ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ ╰─ ConcatArrays
│ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ │ │ │ ├─ ConcatArrays
│ │ │ │ │ │ │ │ │ │ ├─ MakeArray
│ │ │ │ │ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ │ │ │ │ ├─ LeftSide
│ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ │ │ │ ├─ LeftSide
│ │ │ │ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ │ │ ├─ LeftSide
│ │ │ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ │ │ ╰─ Constant(Int(2))
│ │ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ RightSide
│ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ │ │ ├─ LeftSide
│ │ │ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ │ ├─ RightSide
│ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ ╰─ MakeArray
│ │ │ │ │ ╰─ ProjectIndex
│ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ LeftSide
│ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ ╰─ MakeArray
│ │ │ │ ╰─ Guard
│ │ │ │ ├─ ProjectIndex
│ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ ├─ LeftSide
│ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ ╰─ Constant(Int(2))
│ │ │ │ ├─ Type(Obj(Map[], Some(Top)))
│ │ │ │ ├─ ProjectIndex
│ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ ├─ LeftSide
│ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ ╰─ Constant(Int(3))
│ │ │ │ ╰─ ProjectIndex
│ │ │ │ ├─ ProjectIndex
│ │ │ │ │ ├─ LeftSide
│ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ ╰─ Constant(Int(2))
│ │ │ ╰─ MakeArray
│ │ │ ╰─ Or
│ │ │ ├─ Guard
│ │ │ │ ├─ ProjectIndex
│ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ LeftSide
│ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ ╰─ Constant(Int(2))
│ │ │ │ ├─ Type(Obj(Map[], Some(Top)))
│ │ │ │ ├─ ProjectIndex
│ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ │ │ ├─ LeftSide
│ │ │ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ ╰─ Constant(Int(3))
│ │ │ │ ╰─ ProjectIndex
│ │ │ │ ├─ ProjectIndex
│ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ ├─ LeftSide
│ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ ╰─ Constant(Int(0))
│ │ │ │ ╰─ Constant(Int(2))
│ │ │ ╰─ Guard
│ │ │ ├─ ProjectField
│ │ │ │ ├─ ProjectIndex
│ │ │ │ │ ├─ RightSide
│ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ ╰─ Constant(Str(id))
│ │ │ ├─ Type(Str)
│ │ │ ├─ Search
│ │ │ │ ├─ ProjectField
│ │ │ │ │ ├─ ProjectIndex
│ │ │ │ │ │ ├─ RightSide
│ │ │ │ │ │ ╰─ Constant(Int(1))
│ │ │ │ │ ╰─ Constant(Str(id))
│ │ │ │ ├─ Constant(Str(^.*Dr.*$))
│ │ │ │ ╰─ Constant(Bool(false))
│ │ │ ╰─ Undefined
│ │ ╰─ ProjectIndex
│ │ ├─ ○
│ │ ╰─ Constant(Int(3))
│ ╰─ Count
│ ╰─ Map
│ ├─ Unreferenced
│ ╰─ Constant(Int(11))
╰─ ProjectField
├─ ProjectIndex
│ ├─ ○
│ ╰─ Constant(Int(2))
╰─ Constant(Str(profile))
RDD:
(2) MapPartitionsRDD[430] at map at Planner.scala:190 []
| MapPartitionsRDD[429] at map at Planner.scala:142 []
| MapPartitionsRDD[428] at filter at Planner.scala:142 []
| ZippedWithIndexRDD[427] at zipWithIndex at Planner.scala:142 []
| MapPartitionsRDD[424] at filter at Planner.scala:272 []
| MapPartitionsRDD[423] at flatMap at Planner.scala:296 []
| MapPartitionsRDD[422] at map at Planner.scala:190 []
| MapPartitionsRDD[421] at map at Planner.scala:106 []
| ZippedWithIndexRDD[420] at zipWithIndex at Planner.scala:106 []
| MapPartitionsRDD[419] at map at queryfile.scala:40 []
| /Users/rabbit/projects/quasar/it/src/main/resources/tests/user_comments.data MapPartitionsRDD[418] at textFile at queryfile.scala:39 []
| /Users/rabbit/projects/quasar/it/src/main/resources/tests/user_comments.data HadoopRDD[417] at textFile at queryfile.scala:39 []
Query time: 0.4s
name | age | title |
------------|-----|-------|
Mary Jane | 29 | Dr |
Mary Jane | 29 | Dr |
💪 $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment