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

Improved Property Handling #15

Merged
merged 5 commits into from
Feb 20, 2023
Merged

Conversation

greenmtnboy
Copy link
Contributor

Description

Design was previously overopinionated about forcing properties to output at the grain of the related key. While we should preserve properties optimizing to the key grain if in a query together, if the key is not included in the output we should still group up the property itself.

This required refactoring of property grain handling.

As a followup, we should support more granular property syntax to enable optimization.

Specifically, these two cases should be differentiated.

Unique ID integer date key
Unique Property 1-1 with ID date text
Non-unique Property 1-many with ID date month

select
date_key,
date_text,
date_month

should still be treated as grain(datekey)

but select
date_text should be grain(datekey)
and
date_month should be grain(date_month

Type of Change

  • Bug Fix
  • New Feature
  • Breaking Change
  • Refactor
  • Documentation
  • Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@codecov
Copy link

codecov bot commented Feb 20, 2023

Codecov Report

Base: 84.72% // Head: 86.27% // Increases project coverage by +1.55% 🎉

Coverage data is based on head (51a2ec9) compared to base (440ff42).
Patch coverage: 91.95% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
+ Coverage   84.72%   86.27%   +1.55%     
==========================================
  Files          40       40              
  Lines        2121     2259     +138     
==========================================
+ Hits         1797     1949     +152     
+ Misses        324      310      -14     
Impacted Files Coverage Δ
tests/stack_overflow/test_aggregate_grain.py 100.00% <ø> (ø)
preql/parsing/parse_engine.py 87.97% <75.00%> (+2.11%) ⬆️
preql/core/models.py 82.21% <83.78%> (+0.30%) ⬆️
preql/core/processing/concept_strategies.py 84.50% <90.32%> (+6.96%) ⬆️
tests/adventureworks/test_adventureworks.py 80.35% <95.74%> (+3.81%) ⬆️
preql/__init__.py 100.00% <100.00%> (ø)
preql/core/query_processor.py 97.26% <100.00%> (ø)
preql/dialect/base.py 89.83% <100.00%> (+3.62%) ⬆️
preql/dialect/sql_server.py 100.00% <100.00%> (ø)
tests/adventureworks/conftest.py 46.77% <100.00%> (+2.70%) ⬆️
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@greenmtnboy greenmtnboy merged commit fa28151 into main Feb 20, 2023
@greenmtnboy greenmtnboy deleted the edickinson_improved_property branch October 19, 2023 00:01
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.

1 participant