4paradigm / 4paradigm/OpenMLDB

api server: query with null input

Ouverte
#3,902 0 commentaires 0 réactions 1 personne assignée Réclamée par @aceforeverd Voir sur GitHub
api-server bug
Langage dominant
C++
Étoiles
1.7k
Forks
331
Merge moyen
12 j 12 h
PR mergées (30 j)
1

Description

```sh
> curl -X POST http://127.0.0.1:9527/dbs/test_db -d '{"mode":"online","sql": "select * from tx where id = ?", "input": {"schema": ["int16"], "data": [null]}}'
{"code":-1,"msg":"Json parse failed, INVALID_ARGUMENT: append failed on 0 type 1"}⏎
```

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

The issue shows a curl command that fails when querying with a null input parameter. Start by examining the API server code that handles POST requests to /dbs/{db_name}, likely in a file like server/api_server.cc. Look for the SQL parsing and parameter binding logic, particularly how the 'input' field with schema and data is processed. The error message suggests a type mismatch or append failure when handling null for an int16 parameter. Check the data type handling and null value serialization in the database engine. Running the provided curl command against a local instance will reproduce the error.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
sql
Domaine
api, backend, databases
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.