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

refactor dumpers and loaders #92

Merged
merged 1 commit into from Jul 25, 2023
Merged

refactor dumpers and loaders #92

merged 1 commit into from Jul 25, 2023

Conversation

ruslandoga
Copy link
Contributor

@ruslandoga ruslandoga commented Jul 24, 2023

No description provided.

defp bool_decode(1), do: {:ok, true}
defp bool_decode(0), do: {:ok, false}
@doc false
def bool_decode(1), do: {:ok, true}
Copy link
Contributor

Choose a reason for hiding this comment

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

when is number, anything diff from 0 is true, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it depends on what type you are using in ClickHouse:

  • for Bool there are only 1 and 0
  • for UInt8 0..255 can be returned, but then 2..255 is more like undefined behaviour

@ruslandoga ruslandoga changed the title simplify dumpers refactor dumpers and loaders Jul 24, 2023
@ruslandoga ruslandoga marked this pull request as draft July 24, 2023 13:38
@ruslandoga ruslandoga force-pushed the simplify-ch-type branch 2 times, most recently from 2f2f5f6 to 58cd30a Compare July 25, 2023 09:33
@ruslandoga ruslandoga marked this pull request as ready for review July 25, 2023 09:37
@ruslandoga ruslandoga merged commit 494ffe8 into master Jul 25, 2023
2 checks passed
@ruslandoga ruslandoga deleted the simplify-ch-type branch July 25, 2023 09:40
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.

None yet

2 participants