Unknown type names inside a container decode silently as wrong data
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 48/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C
- Estrellas
- 386
- Forks
- 212
- Merge medio
- 18 h 22 min
- PR fusionados (30 d)
- 4
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ClickHouse/clickhouse-cpp
-
enhancement pg_clickhouse
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
ClickHouse/clickhouse-cpp#478 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Array(Nested(...)) columns silently decode as Array(Nothing) and desynchronize the native block streamPosiblemente ocupada @Hakaou la tomó hace 3 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
ClickHouse/clickhouse-cpp#571 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 62/100
ClickHouse/clickhouse-cpp#565 ·
Los mantenedores suelen responder en 1 día
-
Client::Insert concatenates the raw table name into SQL — table names needing backquotes cannot be usedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 72/100
ClickHouse/clickhouse-cpp#560 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Native TCP: CompressionMethod::ZSTD is not honored for server -> client blocks (network_compression_method never sent)Posiblemente ocupada @beejmaxx la tomó hace 25 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
ClickHouse/clickhouse-cpp#556 · 1 reacción ·
Los mantenedores suelen responder en 1 día
Todos los issues de ClickHouse/clickhouse-cpp
Issues similares
-
bug Component component: net
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
RT-Thread/rt-thread#11913 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:docs kind:docs-drift
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
InauguralSystems/EigenScript#1887 ·
Los mantenedores suelen responder en 1 día
-
Broken links in the docsAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
containers/crun#2391 ·
Los mantenedores suelen responder en 1 día
-
[WinReg] update to v12.0.0Abiertocategory:port-update
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
type-bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día