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

System.NotSupportedException:“Unknown column type ” #177

Open
VitaliyMF opened this issue Nov 26, 2024 · 2 comments
Open

System.NotSupportedException:“Unknown column type ” #177

VitaliyMF opened this issue Nov 26, 2024 · 2 comments

Comments

@VitaliyMF
Copy link
Contributor

Description

This exception occurs at "ClickHouse.Ado.ClickHouseDataReader.NextResult()" for some column present in Altinity.Cloud Demo "github_events" table:

System.NotSupportedException: Unknown column type
         at ClickHouse.Ado.Impl.ColumnTypes.ColumnType.Create(String name)
         at ClickHouse.Ado.Impl.Data.ColumnInfo.Read(ProtocolFormatter formatter, Int32 rows, CancellationToken cToken)
         at ClickHouse.Ado.Impl.Data.Block.Read(ProtocolFormatter formatter, CancellationToken cToken)
         at ClickHouse.Ado.Impl.ProtocolFormatter.ReadPacket(Response rv, CancellationToken cToken)
         at ClickHouse.Ado.Impl.ProtocolFormatter.ReadBlock(CancellationToken cToken)
         at ClickHouse.Ado.ClickHouseDataReader.NextResultAsync(CancellationToken cToken)

Steps to reproduce

  1. Connection string: Compress=True;Compressor=lz4;Host=github.demo.altinity.cloud;Port=9440;Encrypt=true;Database=default;User=demo;Password=demo;
  2. SQL query: select * from github_events LIMIT 500

What should be done

"github_events" table has columns with types like Enum8, Array(LowCardinality(String)), Date - it is unclear which type exactly cannot be handled as exception message doesn't contain it for some reason.

@killwort
Copy link
Owner

Could you add github_events CREATE TABLE script?

@VitaliyMF
Copy link
Contributor Author

This is Altinity Demo server https://github.demo.altinity.cloud:8443/play?user=demo (password: demo)

SHOW CREATE TABLE github_events; result:

CREATE TABLE default.github_events
(
    `file_time` DateTime,
    `event_type` Enum8('CommitCommentEvent' = 1, 'CreateEvent' = 2, 'DeleteEvent' = 3, 'ForkEvent' = 4, 'GollumEvent' = 5, 'IssueCommentEvent' = 6, 'IssuesEvent' = 7, 'MemberEvent' = 8, 'PublicEvent' = 9, 'PullRequestEvent' = 10, 'PullRequestReviewCommentEvent' = 11, 'PushEvent' = 12, 'ReleaseEvent' = 13, 'SponsorshipEvent' = 14, 'WatchEvent' = 15, 'GistEvent' = 16, 'FollowEvent' = 17, 'DownloadEvent' = 18, 'PullRequestReviewEvent' = 19, 'ForkApplyEvent' = 20, 'Event' = 21, 'TeamAddEvent' = 22),
    `actor_login` LowCardinality(String),
    `repo_name` LowCardinality(String),
    `created_at` DateTime CODEC(Delta(4), LZ4),
    `updated_at` DateTime,
    `action` Enum8('none' = 0, 'created' = 1, 'added' = 2, 'edited' = 3, 'deleted' = 4, 'opened' = 5, 'closed' = 6, 'reopened' = 7, 'assigned' = 8, 'unassigned' = 9, 'labeled' = 10, 'unlabeled' = 11, 'review_requested' = 12, 'review_request_removed' = 13, 'synchronize' = 14, 'started' = 15, 'published' = 16, 'update' = 17, 'create' = 18, 'fork' = 19, 'merged' = 20),
    `comment_id` UInt64,
    `body` String CODEC(ZSTD(1)),
    `path` String,
    `position` Int32,
    `line` Int32,
    `ref` LowCardinality(String),
    `ref_type` Enum8('none' = 0, 'branch' = 1, 'tag' = 2, 'repository' = 3, 'unknown' = 4),
    `creator_user_login` LowCardinality(String),
    `number` UInt32,
    `title` String,
    `labels` Array(LowCardinality(String)),
    `state` Enum8('none' = 0, 'open' = 1, 'closed' = 2),
    `locked` UInt8,
    `assignee` LowCardinality(String),
    `assignees` Array(LowCardinality(String)),
    `comments` UInt32,
    `author_association` Enum8('NONE' = 0, 'CONTRIBUTOR' = 1, 'OWNER' = 2, 'COLLABORATOR' = 3, 'MEMBER' = 4, 'MANNEQUIN' = 5),
    `closed_at` DateTime,
    `merged_at` DateTime,
    `merge_commit_sha` String,
    `requested_reviewers` Array(LowCardinality(String)),
    `requested_teams` Array(LowCardinality(String)),
    `head_ref` LowCardinality(String),
    `head_sha` String,
    `base_ref` LowCardinality(String),
    `base_sha` String,
    `merged` UInt8,
    `mergeable` UInt8,
    `rebaseable` UInt8,
    `mergeable_state` Enum8('unknown' = 0, 'dirty' = 1, 'clean' = 2, 'unstable' = 3, 'draft' = 4, 'blocked' = 5),
    `merged_by` LowCardinality(String),
    `review_comments` UInt32,
    `maintainer_can_modify` UInt8,
    `commits` UInt32,
    `additions` UInt32,
    `deletions` UInt32,
    `changed_files` UInt32,
    `diff_hunk` String,
    `original_position` UInt32,
    `commit_id` String,
    `original_commit_id` String,
    `push_size` UInt32,
    `push_distinct_size` UInt32,
    `member_login` LowCardinality(String),
    `release_tag_name` String,
    `release_name` String,
    `review_state` Enum8('none' = 0, 'approved' = 1, 'changes_requested' = 2, 'commented' = 3, 'dismissed' = 4, 'pending' = 5),
    `date` Date ALIAS toDate(created_at),
    `actor_id` UInt32 MATERIALIZED dictGetUInt32('default.user_count_dict', 'id', actor_login)
)
ENGINE = MergeTree
PARTITION BY toYear(created_at)
ORDER BY (event_type, action, repo_name, created_at)
SETTINGS index_granularity = 8192, max_suspicious_broken_parts_bytes = '100G'

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