-
Notifications
You must be signed in to change notification settings - Fork 101
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
Add support for Float64
for Clickhouse (SaaS)
#12
Comments
@ilongin, would it be possible to change the test assumptions to reduce precision (eg: with |
I will fix the tests for now (using |
pinging @dmpetrov for changing default size of |
It looks like we have to move to float64 by default since it's python default type. Related to iterative/dvcx#1697 |
That's not a usualy way of comparing floats. Please use Otherwise, moving to float64 makes sense. We should do that everywhere. |
That was just an example to show that values are different between Clickhouse and SQLite so this is not a real test or something. |
oh, now got it! |
@ilongin is it still relevant or we can close? |
@dmpetrov yes, looks like example in description works now so I'm closing this issue. |
I don't think we have made any changes to this. @ilongin, can you point me the commit that fixed this please? |
@skshetry I made a mistake testing this on SQLite DB instead of Clickhouse. Reopening it agan. |
Let's discuss this approach, please? https://github.com/iterative/studio/pull/10528 🙏👀 |
Should be fixed now by related Studio issue. |
The problem is that if number that can only be represented with double precision, e.g
0.3813476562
is inserted using CH database (in SaaS), it's actually inserted as single precision (Float32
) as pythonfloat
is saved asFloat32
column type in database by default. This way precision of that value is lost for user.One solution is to support
datachain.sql.types
when defining output schema (currently only python basic values are supported together withFeature
type).Example that works for SQLite but fails for Clickhouse:
The text was updated successfully, but these errors were encountered: