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

Support query composition #27

Merged
merged 1 commit into from
Oct 16, 2016
Merged

Support query composition #27

merged 1 commit into from
Oct 16, 2016

Conversation

davidagold
Copy link
Owner

@davidagold davidagold commented Oct 15, 2016

It was noted in this discussion that dummy sources could be replaced by functions, so long as one can compose Querys by means of the @query macro. This PR introduces that functionality:

julia> df = DataFrame()
0×0 DataFrames.DataFrame


julia> f(q::Query) = @query q |> select(A)
f (generic function with 1 method)

julia> f(@query filter(df, A > .5))
Query against a source of type 0×0 DataFrames.DataFrame


julia> ans.graph
SelectNode
  arguments:
      1)  A
  inputs:
      1)  FilterNode
            arguments:
                1)  A > 0.5
            inputs:
                1)  DataNode
                      source:  source of type DataFrame

EDIT: c.f. #20

@codecov-io
Copy link

codecov-io commented Oct 15, 2016

Current coverage is 84.55% (diff: 100%)

Merging #27 into master will increase coverage by 0.12%

@@             master        #27   diff @@
==========================================
  Files            24         24          
  Lines           244        246     +2   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            206        208     +2   
  Misses           38         38          
  Partials          0          0          

Powered by Codecov. Last update b4afe26...f0fe683

@davidagold davidagold merged commit ae11b65 into master Oct 16, 2016
@davidagold davidagold deleted the query branch October 16, 2016 00:39
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.

2 participants