davidagold / StructuredQueries.jl

Query representations for Julia
Other
53 stars 5 forks source link

Adding new ops #17

Closed datnamer closed 8 years ago

datnamer commented 8 years ago

Hello,

Extensibility was mentioned in the context of extending ops to new types. Is there also a framework for adding new ops, or will this require macro/graph fiddling? For example, I would like to add reshaping ops from tidyr like gather and spread, and I'm sure other users have functions to add.

Thanks

davidagold commented 8 years ago

Hi @datnamer, sorry for the delayed response.

There will be a framework for adding new operations that will not require messing with the internals of any macros. Adding a new operation will entail (in part) creating a new QueryNode leaf subtype object that will then represent the desired operation in a query graph. The internals of the @query macro allow for very easy integration of new QueryNodes -- the user will not be responsible for extending the graph logic to include the ability to represent new commands. I intend to offer some functionality that automates this part. It will be the extender's responsibility to implement the functionality in the respective collect/_collect method, which collects a data source against the QueryNode.

datnamer commented 8 years ago

That sounds great thanks so much.