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

allow for expressing invariance rules and optimizations around them #34

Open
dwiel opened this issue Jan 21, 2016 · 0 comments
Open

allow for expressing invariance rules and optimizations around them #34

dwiel opened this issue Jan 21, 2016 · 0 comments

Comments

@dwiel
Copy link
Owner

dwiel commented Jan 21, 2016

In some cases I've written rules like this:

@gc.rule(['location.id'], 'location.location_months.location.id')                
def location_location_months_location_id(id):                                    
    return id

Because this transformation is opaque to graphcore (it sees it as a python function) and so can't optimize across that boundary as in this case:

location.location_months.location.date_of_first_email = <SQLQuery tables:locations; selects:locations.date_of_first_email; where:{} input_mapping:{'id': 'locations.id'}; limit:None; one_column:True; first:True>(location.location_months.location.id) 
location.establishment_type.name, location.name, location.establishment_type.id, location.house_state, location.id = <SQLQuery tables:establishment_types, locations; selects:establishment_types.name, locations.name, locations.establishment_type_id, locations.house_state, locations.id; where:{'locations.house_state': 'release', 'establishment_types.id': 'locations.establishment_type_id'} input_mapping:{}; limit:None; one_column:False; first:False>() Cardinality.many 

these SQLQueries should be mergable, but since there is this python function inbetween, it can't.

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

No branches or pull requests

1 participant