Skip to content

Create a table with table name ann will invoke SyntaxError exception #1806

@Hazel-Datastax

Description

@Hazel-Datastax

Reproduction:

create table :

{
    "createTable": {
        "name": "ann",
        "definition": {
            "columns": {
                "t": "text",
                "v": {
                    "type": "vector",
                    "dimension": 5
                }
            },
            "primaryKey": "t"
        }
    }
}

response:

{
    "status": {
        "ok": 0
    },
    "errors": [
        {
            "message": "An unexpected server error occurred while processing the request. \n\nError Class: SyntaxError\nError Message: line 1:34 mismatched character '(' expecting set null",
            "scope": "",
            "errorCode": "UNEXPECTED_SERVER_ERROR",
            "exceptionClass": "ServerException",
            "id": "04ac1a97-232b-42ac-bdc2-38b6764f9ab0",
            "family": "SERVER",
            "title": "Unexpected server error"
        }
    ]
}

log:

RequestLogger.java:244 - [default_tenant|1390275793][Node(endPoint=/127.0.0.1:9042, hostId=0696a29c-0adb-4f00-904a-45a3450049a7, hashCode=2ad7212e)] Error (9 ms) [0 values] CREATE TABLE default_keyspace.ann (t text PRIMARY KEY,v VECTOR<float,5>) WITH extensions={'com.datastax.data-api.schema-type':'0x7461626c65','com.datastax.data-api.schema-def-version':'0x31'}: com.datastax.oss.driver.api.core.servererrors.SyntaxError: line 1:34 mismatched character '(' expecting set null

I think the issue is ann is the keyword in CQL so it invokes the SyntaxError when executing CREATE TABLE default_keyspace.ann (t text PRIMARY KEY,v VECTOR<float,5>) ....

Metadata

Metadata

Labels

BugSomething isn't workingFeature - TablesIssue impacts the users of Tables

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions