Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

select(::Table, ::Pair{Tuple, Tuple}) #55

Closed
wants to merge 4 commits into from
Closed

select(::Table, ::Pair{Tuple, Tuple}) #55

wants to merge 4 commits into from

Conversation

shashi
Copy link
Collaborator

@shashi shashi commented Jul 10, 2017

julia> t
x  y   │ color    size
───────┼──────────────
1  "a" │ "red"    15
2  "b" │ "green"  10
3  "c" │ "blue"   5

julia> select(t, (:color,:size) => (:y,))
color    size │ y
──────────────┼────
"blue"   5    │ "c"
"green"  10   │ "b"
"red"    15   │ "a"

julia> select(t, (:color,:x))
3-element IndexedTables.Columns{NamedTuples._NT_color_x{String,Int64},NamedTuples._NT_color_x{Array{String,1},Array{Int64,1}}}:
 (color = "red", x = 1)  
 (color = "green", x = 2)
 (color = "blue", x = 3) 

julia> select(t, (2,3)=>(1,4))
─────────────┬──────
"a"  "red"   │ 1  15
"b"  "green" │ 2  10
"c"  "blue"  │ 3  5

julia> select(t, (2,3)=>(as(:x, :id), as(x->15-x, :size, :invsize)))
             │ id  invsize
─────────────┼────────────
"a"  "red"   │ 1   0
"b"  "green" │ 2   5
"c"  "blue"  │ 3   10

@davidanthoff
Copy link
Contributor

Very cool, I think we are getting very close to be able to create some custom Query.jl backends for IndexedTable and JuliaDB that give the normal Query.jl user API with the much improved performance of these types here. Very exciting!!

@codecov-io
Copy link

codecov-io commented Jul 12, 2017

Codecov Report

Merging #55 into master will decrease coverage by 0.54%.
The diff coverage is 79.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #55      +/-   ##
==========================================
- Coverage   93.49%   92.94%   -0.55%     
==========================================
  Files           6        6              
  Lines         922      964      +42     
==========================================
+ Hits          862      896      +34     
- Misses         60       68       +8
Impacted Files Coverage Δ
src/columns.jl 95.45% <100%> (+0.1%) ⬆️
src/IndexedTables.jl 91.96% <50%> (-3.23%) ⬇️
src/utils.jl 97.47% <66.66%> (-0.8%) ⬇️
src/join.jl 88.8% <75%> (+0.09%) ⬆️
src/query.jl 94.93% <88.46%> (-0.8%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 01dde0b...37bb28e. Read the comment docs.

@shashi shashi mentioned this pull request Jul 17, 2017
@shashi shashi mentioned this pull request Aug 2, 2017
@shashi shashi closed this Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants