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

Makes queries per-table #227

Merged
merged 4 commits into from
Jul 31, 2017
Merged

Makes queries per-table #227

merged 4 commits into from
Jul 31, 2017

Conversation

rmarianski
Copy link
Member

@rmarianski rmarianski commented Jul 28, 2017

@rmarianski rmarianski changed the title Makes queries per-table WIP Makes queries per-table Jul 28, 2017


def convert_source_data_to_feature_layers(rows, layer_data, bounds, zoom):
# TODO we might want to fold in the other processing into this
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a note for the glorious future or for the current sprint?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would have been a performance improvement, if we find that when we run it on dev it's too slow. If it's unnecessary, it might be better to hold off on this since it might change with phase 3 anyway.

for layer_datum in layer_data:
layer = layer_datum['name']
features = features_by_layer[layer]
# TODO padded bounds
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To support the MVT Buffered format or something additional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, exactly.

boundaries_geometry = row.pop('__boundaries_geometry__', None)
assert geometry or boundaries_geometry

common_props = row.pop('__properties__', None) or {}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the same thing as row.pop('__properties__', {})?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see... the way it is at the moment handles the case where row['__properties__'] exists, but is None. I feel like that's slightly non-obvious.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just confused myself too, so I expanded it out and added a comment in da19aa0.

Copy link
Member

@zerebubuth zerebubuth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@rmarianski rmarianski changed the title WIP Makes queries per-table Makes queries per-table Jul 31, 2017
@rmarianski rmarianski merged commit fe8aa43 into master Jul 31, 2017
@rmarianski rmarianski deleted the query-by-table branch July 31, 2017 18:15
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