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

Remove default value checks #852

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ilongin
Copy link
Contributor

@ilongin ilongin commented Jan 23, 2025

Companion issue of https://github.com/iterative/studio/pull/11236
With making CH accept nullable columns, we no longer need special checks for default values in tests, as they will be None always.

@ilongin ilongin marked this pull request as draft January 23, 2025 00:09
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

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

Project coverage is 87.57%. Comparing base (60aed77) to head (cf11072).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/datachain/data_storage/db_engine.py 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #852      +/-   ##
==========================================
- Coverage   87.59%   87.57%   -0.02%     
==========================================
  Files         128      128              
  Lines       11382    11383       +1     
  Branches     1540     1540              
==========================================
- Hits         9970     9969       -1     
- Misses       1025     1027       +2     
  Partials      387      387              
Flag Coverage Δ
datachain 87.50% <66.66%> (-0.02%) ⬇️

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.

Copy link

cloudflare-workers-and-pages bot commented Jan 24, 2025

Deploying datachain-documentation with  Cloudflare Pages  Cloudflare Pages

Latest commit: cf11072
Status: ✅  Deploy successful!
Preview URL: https://f5314378.datachain-documentation.pages.dev
Branch Preview URL: https://ilongin-11161-clickhouse-nul.datachain-documentation.pages.dev

View logs

@@ -276,8 +276,9 @@ def has_table(self, name: str) -> bool:
)
return bool(next(self.execute(query))[0])

def create_table(self, table: "Table", if_not_exists: bool = True) -> None:
def create_table(self, table: "Table", if_not_exists: bool = True) -> "Table":
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing this as it makes code better in Studio part where table columns are modified to allow nullable

@ilongin ilongin marked this pull request as ready for review January 27, 2025 10:09
Copy link
Contributor

@dreadatour dreadatour left a comment

Choose a reason for hiding this comment

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

👍

@skshetry
Copy link
Member

Can we introduce something like strict mode in schema, similar to pydantic to support non-nullable types?

https://docs.pydantic.dev/latest/concepts/strict_mode/

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.

4 participants