IMSMWU/RClickhouse

Loading a Bool-datatype column

Opened this issue · 4 comments

Please register the Bool-datatype when loading the dataset in the form of logical-class

Clickhouse does not support a dedicated Boolean type. It is basically an alias for UInt8 such that a direct translation could lead to unexpected behavior. See https://content.clickhouse.tech/docs/en/sql-reference/data-types/boolean/ for more details.

@inkrement

  1. There is such a type !!!
  2. In the clickhouse they simply do not know how to keep documentation
  3. Here is a complaint about incorrect documentation on Boolean: ClickHouse/ClickHouse#36294

Here is the documentation, a click for some reason leads both sites at the same time: https://clickhouse.com/docs/en/sql-reference/data-types/boolean

Please open the task and add the data type

I'll split my response into a (1) more or less emotional general and a (2) hopefully objective and constructive issue-related part:

1) Let's start with the general.

  1. This is an free software project maintained by volunteers. No, we are not paid for it. And no, there is no large support team here, nor is this a wish-granting gig. That's why we can't always answer immediately, nor will every requested feature be implemented promptly.
  2. Please do not spam these forums. You can edit and extend your answers and issues at any time. If we close an issue, we do it for a good reason and not in the hope that you will open the same topic again (that makes no sense and only costs time on both sides).

2) Now to the actual topic.

ClickHouse is developing rapidly. I am not always up to date; sometimes, the documentation is outdated. Therefore, we may make decisions based on wrong information. Indeed, casting bool as logical makes sense if there is a dedicated boolean type (not an alias for UInt8 as it used to be). We'll look at this again and may extend it accordingly. However, if you need this function badly, feel free to provide a pull request (this is the great part of free software). Meanwhile, you can use UInt8 to load the data and manually convert it to Logical. This is not ideal, but should be doable and sufficient for now.

@inkrement

Hi!

  1. Thanks for reopened!
  2. The copy of the documentation you referred to above is a Clickhouse joint, they promised to fix it, it turned out to be an interesting find.
    image
  3. I just caught a lack of functionality, spent my time, filled out an application in github. I don't ask about the timing of the decision, because open source. But I started the application for a reason, and gaps in the documentation of the clickhouse are an ordinary phenomenon. Accordingly, I immediately gave feedback, did not receive a response in hour. It turned out unpleasant.
  4. Cleaned up this issue from unnecessary comments

The main thing is that everything has been resolved, I hope someday Bool will appear. Not critical, but it would be useful.

Thanks again!