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

feat: Duration for sql representation + aggregation support #1384

Merged
merged 11 commits into from
Apr 6, 2023

Conversation

chloeminkyung
Copy link
Contributor

@chloeminkyung chloeminkyung commented Apr 6, 2023

Aggregation Support

  • Avg - AVG(DURATION) -> DURATION
  • Count - COUNT(DURATION) -> INT
  • Max - MAX(DURATION) -> DURATION
  • Min - MIN(DURATION) -> DURATION
  • Sum - SUM(DURATION) -> DURATION

SQL Representation

  • INTERVAL '1' SECOND
  • "6/04/2023 10:00" + INTERVAL '30' SECOND
  • "6/04/2023 10:00" - INTERVAL '30' SECOND

Currently only supported TimeUnits are:

Signed-off-by: Chloe Kim <chloeminkyung@gmail.com>
@chloeminkyung chloeminkyung marked this pull request as draft April 6, 2023 07:13
@coveralls
Copy link

coveralls commented Apr 6, 2023

Pull Request Test Coverage Report for Build 4627722741

  • 812 of 965 (84.15%) changed or added relevant lines in 14 files are covered.
  • 346 unchanged lines in 13 files lost coverage.
  • Overall coverage decreased (-0.01%) to 72.096%

Changes Missing Coverage Covered Lines Changed/Added Lines %
dozer-sql/src/pipeline/aggregation/tests/aggregation_tests_utils.rs 12 13 92.31%
dozer-sql/src/pipeline/expression/execution.rs 17 19 89.47%
dozer-sql/src/pipeline/aggregation/max.rs 3 6 50.0%
dozer-sql/src/pipeline/aggregation/min.rs 3 6 50.0%
dozer-sql/src/pipeline/aggregation/count.rs 0 4 0.0%
dozer-sql/src/pipeline/aggregation/sum.rs 13 18 72.22%
dozer-sql/src/pipeline/aggregation/tests/aggregation_max_tests.rs 136 154 88.31%
dozer-sql/src/pipeline/aggregation/tests/aggregation_min_tests.rs 136 154 88.31%
dozer-sql/src/pipeline/aggregation/tests/aggregation_avg_tests.rs 141 163 86.5%
dozer-sql/src/pipeline/aggregation/tests/aggregation_count_tests.rs 101 123 82.11%
Files with Coverage Reduction New Missed Lines %
dozer-sql/src/pipeline/aggregation/count.rs 4 64.29%
dozer-sql/src/pipeline/aggregation/max.rs 4 58.18%
dozer-sql/src/pipeline/aggregation/min.rs 4 58.18%
dozer-sql/src/pipeline/aggregation/sum.rs 8 56.71%
dozer-sql/src/pipeline/aggregation/tests/aggregation_tests_utils.rs 10 94.33%
dozer-sql/src/pipeline/expression/cast.rs 10 47.44%
dozer-sql/src/pipeline/expression/datetime.rs 12 59.6%
dozer-sql/src/pipeline/expression/execution.rs 12 51.06%
dozer-sql/src/pipeline/aggregation/tests/aggregation_avg_tests.rs 13 94.26%
dozer-sql/src/pipeline/aggregation/tests/aggregation_sum_tests.rs 18 91.13%
Totals Coverage Status
Change from base Build 4626388611: -0.01%
Covered Lines: 34289
Relevant Lines: 47560

💛 - Coveralls

Signed-off-by: Chloe Kim <chloeminkyung@gmail.com>
Signed-off-by: Chloe Kim <chloeminkyung@gmail.com>
Signed-off-by: Chloe Kim <chloeminkyung@gmail.com>
Signed-off-by: Chloe Kim <chloeminkyung@gmail.com>
Signed-off-by: Chloe Kim <chloeminkyung@gmail.com>
Signed-off-by: Chloe Kim <chloeminkyung@gmail.com>
Signed-off-by: Chloe Kim <chloeminkyung@gmail.com>
Signed-off-by: Chloe Kim <chloeminkyung@gmail.com>
Signed-off-by: Chloe Kim <chloeminkyung@gmail.com>
@chloeminkyung chloeminkyung marked this pull request as ready for review April 6, 2023 09:57
Signed-off-by: Chloe Kim <chloeminkyung@gmail.com>
@chloeminkyung chloeminkyung merged commit a2a7533 into main Apr 6, 2023
@chloeminkyung chloeminkyung deleted the feat/sql-duration branch April 6, 2023 10:25
@chloeminkyung chloeminkyung linked an issue Apr 6, 2023 that may be closed by this pull request
chloeminkyung pushed a commit that referenced this pull request Apr 6, 2023
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.

SQL representation of Duration
3 participants