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: Add ByteHouse database connector #23140

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RafsanMazumder
Copy link

SUMMARY

feat: Add ByteHouse database connector https://bytehouse.cloud/

TESTING INSTRUCTIONS

Manual Testing

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

Thanks for adding support for ByteHouse! Without implementing time grain functions or datetime conversion logic I fear this spec will not be very useful. I recommend looking into how other engines are implementing the _time_grain_expressions (as an example, I assume you should map at least P1Y to toStartOfISOYear({col}) based on https://docs.bytehouse.cloud/en/docs/date-times#tostartofhour). Also, check out convert_dttm, where you should at least handle toDate and toDateTime.

@pull-request-size pull-request-size bot added size/L and removed size/M labels Mar 2, 2023
@RafsanMazumder
Copy link
Author

@villebro Thank you for your suggestion. I have added the conversion for _time_grain_expressions, as well as handled the Date & DateTime datatype.

@rusackas
Copy link
Member

rusackas commented Feb 9, 2024

Looks like this one got away from us a bit! @rafsan-mazumder would you be willing to give this a rebase?

@github-actions github-actions bot added the doc Namespace | Anything related to documentation label Jun 6, 2024
@rusackas
Copy link
Member

rusackas commented Jun 6, 2024

Running CI 🤞

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 95.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 83.67%. Comparing base (76d897e) to head (c3a300f).
Report is 290 commits behind head on master.

Files Patch % Lines
superset/db_engine_specs/bytehouse.py 95.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #23140       +/-   ##
===========================================
+ Coverage   60.48%   83.67%   +23.19%     
===========================================
  Files        1931      519     -1412     
  Lines       76236    37512    -38724     
  Branches     8568        0     -8568     
===========================================
- Hits        46114    31390    -14724     
+ Misses      28017     6122    -21895     
+ Partials     2105        0     -2105     
Flag Coverage Δ
hive 48.93% <70.00%> (-0.23%) ⬇️
javascript ?
mysql 77.20% <70.00%> (?)
postgres 77.31% <70.00%> (?)
presto 53.54% <70.00%> (-0.26%) ⬇️
python 83.67% <95.00%> (+20.19%) ⬆️
sqlite 76.76% <70.00%> (?)
unit 59.06% <95.00%> (+1.44%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

import pytest

from tests.unit_tests.db_engine_specs.utils import assert_convert_dttm
from tests.unit_tests.fixtures.common import dttm
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
from tests.unit_tests.fixtures.common import dttm

The ruff linter says this isn't needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Namespace | Anything related to documentation size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants