infiniflow / infinity

The AI-native database built for LLM applications, providing incredibly fast hybrid search of dense vector, sparse vector, tensor (multi-vector), and full-text
https://infiniflow.org
Apache License 2.0
2.58k stars 271 forks source link

[Bug]: Cannot set default values with RESTful API `create_table` #1738

Closed writinwaters closed 1 month ago

writinwaters commented 2 months ago

Is there an existing issue for the same bug?

Version or Commit ID

v0.3.0-dev6

Other environment information

No response

Actual behavior and How to reproduce it

show_table_columns returns default values of each column. But I cannot set default column value with create_table:

 curl --request POST      --url http://localhost:23820/databases/default_db/tables/table_with_default      --header 'accept: application/json'      --header 'content-type: application/json'      --data ' {
       "create_option": "ignore_if_exists",
       "fields": [
           {
               "name": "name",
               "type": "varchar"
           },
           {
               "name": "score",
               "type": "float",
               "default": 5.0
           }
        ]
     } '
server=oatpp/1.3.0
code=500
description=Internal Server Error
message=[json.exception.type_error.305] cannot use operator[] with a string argument with number/string

Expected behavior

No response

Additional information

No response

yangzq50 commented 2 months ago

Is this bug fixed now?