Unknown type names inside a container decode silently as wrong data
Les mainteneurs répondent en général sous 1 jour
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 48/100
Piste de recherche
Read the parser and column factory paths discussed in the issue, especially CreateColumnByType and ValidateAST, then review #575 and the stacked draft #590 for the Nested node and container handling. Add validation so unknown types inside the six supported containers fail with the same unsupported column type error as root types, while preserving Nothing behavior. Verify with the reported Array(Int256) case and the existing container tests; the client should reject it instead of misreading the block.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Follow-up to the second point of the suggested fix in #571, which #575 leaves aside: validating the elements of a container, so that an unknown type name fails loudly instead of desynchronising the stream.
A type name the parser does not know becomes a Void terminal. At the root, ValidateAST rejects it and the client throws "unsupported column type". Inside a container nothing checks it: the column is created as ColumnNothing, which reads one byte per row, and the rest of the block is misread without any error.
In the client itself, on master (fc5d98f):
CreateColumnByType("Int256"); // nullptr, the client reports "unsupported column type: Int256"
CreateColumnByType("Array(Int256)"); // a column typed Array(Void), no error
Against ClickHouse 26.11:
SELECT CAST(1, 'Int256') AS wide -- UnimplementedError: unsupported column type: Int256
SELECT [CAST(1, 'Int256')] AS wide -- one row, no exception, wrong content
Other names a server sends as is and the parser does not know, checked with toTypeName on 26.11: Variant, Dynamic, BFloat16, UInt256, the Interval* types, LineString, MultiPoint, QBit, AggregateFunction. At the root each of them is an error. Inside a container that accepts it, as Array(Int256) shows, the data is misread without any error. Nothing goes through the same path and only works by accident, one byte per row on both sides, which SELECT [] and SELECT NULL rely on.
#578 handles the neighbouring case, a known name the factory cannot build inside a wrapper, which crashed. This one is about names the parser does not know at all, and the two change different functions.
#590 is a draft for it, stacked on #575 because it needs the Nested node from there. It validates the elements of those six containers, leaves the arguments of every other type alone (JSON settings and typed paths, the function name of SimpleAggregateFunction), and registers Nothing. An unknown name inside a container then makes CreateColumnByType return nullptr, so the client throws the same "unsupported column type" as at the root.
Would you rather have a diagnostic that names the inner type? The tests hold either way.
- Langage dominant
- C
- Étoiles
- 385
- Forks
- 211
- Merge moyen
- 18 h 22 min
- PR mergées (30 j)
- 4
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de ClickHouse/clickhouse-cpp
-
enhancement pg_clickhouse
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
ClickHouse/clickhouse-cpp#478 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Array(Nested(...)) columns silently decode as Array(Nothing) and desynchronize the native block streamPeut-être pris @Hakaou l’a pris il y a 2 jours. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 68/100
ClickHouse/clickhouse-cpp#571 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 3-5 jours Accessibilité débutants 62/100
ClickHouse/clickhouse-cpp#565 ·
Les mainteneurs répondent en général sous 1 jour
-
Client::Insert concatenates the raw table name into SQL — table names needing backquotes cannot be usedPeut-être à nouveau libre Une pull request pour cette issue a été fermée sans être fusionnée. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 72/100
ClickHouse/clickhouse-cpp#560 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Native TCP: CompressionMethod::ZSTD is not honored for server -> client blocks (network_compression_method never sent)Peut-être pris @beejmaxx l’a pris il y a 25 jours. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 68/100
ClickHouse/clickhouse-cpp#556 · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de ClickHouse/clickhouse-cpp
Issues similaires
-
Mark ignored Mac OS partitions RecoveryOSContainer and iBootSystemContainerPeut-être pris @meven l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
storaged-project/udisks#1559 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 71/100
awslabs/aws-checksums#121 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
Les mainteneurs répondent en général sous 3 jours
-
Bad tag for language cardOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 68/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100