4paradigm / 4paradigm/OpenMLDB
map data type limitations
- Langage dominant
- C++
- Étoiles
- 1.7k
- Forks
- 331
- Merge moyen
- 12 j 12 h
- PR mergées (30 j)
- 1
Description
**Bug Description**
test table: `CREATE TABLE t1 (c1 string, c2 int, c3 MAP);`
1. In the `desc t1;` statement, the key and value types of the map are not displayed.
2. In the `SHOW CREATE TABLE t1;` statement, columns of type map are not displayed.
3. In the SQL syntax documentation for table creation, the support for the map type is not specified. It is necessary to add support documentation for the map type and provide an example.
4. After executing the statement INSERT INTO t1 VALUES ("1", 1, map(1, "12", 2, "100"));, a warning-level alert log is being displayed.
`insert into t1 values ("1", 1, map(1, "12", 2, "100"));`
`W20240429 14:40:09.353835 19961 codec.cc:82] type is not supported`
6. In the `SELECT * FROM t1;` statement, the columns are displaying incorrectly or out of alignment.

Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
The issue describes multiple problems with the MAP data type in OpenMLDB: display in DESC and SHOW CREATE TABLE, missing documentation, a warning log on INSERT, and misaligned SELECT output. Start by examining the SQL parser and type system code for map support, check the codec.cc file for the unsupported type warning, and review the table schema rendering logic. Testing involves creating tables with MAP columns and verifying the output of various SQL commands.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- sql
- Domaine
- databases, documentation
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 35/100