Unknown type names inside a container decode silently as wrong data
Maintainer antworten meist innerhalb von 1 Tag
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 48/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- C
- Sterne
- 385
- Forks
- 211
- Ø Merge
- 18 Std. 22 Min.
- Gemergte PRs (30 T.)
- 4
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ClickHouse/clickhouse-cpp
-
enhancement pg_clickhouse
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
ClickHouse/clickhouse-cpp#478 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Array(Nested(...)) columns silently decode as Array(Nothing) and desynchronize the native block streamEvtl. vergeben @Hakaou hat das vor 3 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
ClickHouse/clickhouse-cpp#571 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 62/100
ClickHouse/clickhouse-cpp#565 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Client::Insert concatenates the raw table name into SQL — table names needing backquotes cannot be usedEvtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
ClickHouse/clickhouse-cpp#560 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Native TCP: CompressionMethod::ZSTD is not honored for server -> client blocks (network_compression_method never sent)Evtl. vergeben @beejmaxx hat das vor 25 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
ClickHouse/clickhouse-cpp#556 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in ClickHouse/clickhouse-cpp
Ähnliche Issues
-
category:port-update
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 2 Tagen
-
feat(palindrome): add C solutionEvtl. vergeben @aadiitya2007 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
techcsispit/code-corner#58 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
logo request
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
fastfetch-cli/fastfetch#2661 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Mark ignored Mac OS partitions RecoveryOSContainer and iBootSystemContainerEvtl. vergeben @meven hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
storaged-project/udisks#1559 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 71/100
awslabs/aws-checksums#121 ·