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

"cannot read unsupported type: Void" error #96

Open
ivan-tkatchev opened this issue Dec 13, 2022 · 2 comments
Open

"cannot read unsupported type: Void" error #96

ivan-tkatchev opened this issue Dec 13, 2022 · 2 comments

Comments

@ivan-tkatchev
Copy link

R code:

> con <- DBI::dbConnect(RClickhouse::clickhouse(), host="ch-12", db="pivot2")
> tbl(con, "dashboard") %>% filter(date==as.Date('2022-12-01'))
Error in fetch(res@ptr, n) : cannot read unsupported type: Void

Here is the corresponding Clickhouse table schema:

CREATE TABLE pivot2.dashboard
(
    `date` Date,
    `_orig_part` LowCardinality(String),
    `what` LowCardinality(String),
    `hour` UInt8,
    `dsp_id` UInt32,
    `endpoint_id` UInt32,
    `line_item_id` UInt32,
    `external_creative_id` UInt32,
    `ssp` LowCardinality(String),
    `imp_type` LowCardinality(String),
    `names` LowCardinality(String),
    `os` LowCardinality(String),
    `channel_type` LowCardinality(String),
    `country_id` UInt8,
    `state_id` UInt16 CODEC(T64, LZ4),
    `bundle` LowCardinality(String),
    `is_rewarded` UInt8,
    `api` Array(Int8),
    `count` SimpleAggregateFunction(sum, UInt64),
    `win_price_dsp` SimpleAggregateFunction(sum, UInt64),
    `external_bid_price_dsp` SimpleAggregateFunction(sum, UInt64)
)
ENGINE = ReplicatedAggregatingMergeTree('/clickhouse/tables/ssd/pivot2/{shard}/dashboard3', '{replica}')
PARTITION BY toYYYYMM(date)
PRIMARY KEY (_orig_part, date, what, ssp, imp_type, dsp_id, channel_type, country_id, endpoint_id, names)
ORDER BY (_orig_part, date, what, ssp, imp_type, dsp_id, channel_type, country_id, endpoint_id, names, os, state_id, is_rewarded, api, hour, line_item_id, bundle, external_creative_id)
TTL date + toIntervalYear(1)
SETTINGS index_granularity = 8192, ttl_only_drop_parts = 1
@ivan-tkatchev ivan-tkatchev changed the title "cannot read unsupported type: Void" "cannot read unsupported type: Void" error Dec 13, 2022
@ivan-tkatchev
Copy link
Author

Additionally:

> DBI::dbGetQuery(con, "SELECT * FROM dashboard where date=today() limit 1")

 *** caught segfault ***
address (nil), cause 'memory not mapped'

Traceback:
 1: select(conn@ptr, statement)
 2: dbSendQuery(conn, statement, ...)
 3: dbSendQuery(conn, statement, ...)
 4: .local(conn, statement, ...)
 5: DBI::dbGetQuery(con, "SELECT * FROM dashboard where date=today() limit 1")
 6: DBI::dbGetQuery(con, "SELECT * FROM dashboard where date=today() limit 1")

@inkrement
Copy link
Member

Thanks for reaching out. I don't have a ReplicatedMergeTree in use and, therefore, cannot easily test it. Could you please create a new plain MergeTree table with a small subset of the rows and query it with the RClickhouse package? If it works, the issue is related to the nature of Replicated or Aggregating MergeTrees, and then it is easier for us to debug further.

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

No branches or pull requests

2 participants