ArcadeData / arcadedb

ArcadeDB Multi-Model Database, one DBMS that supports SQL, Cypher, Gremlin, HTTP/JSON, MongoDB and Redis. ArcadeDB is a conceptual fork of OrientDB, the first Multi-Model DBMS. ArcadeDB supports Vector Embeddings.
https://arcadedb.com
Apache License 2.0
502 stars 61 forks source link

Issue in postgres query parser? #1525

Open akumbhani66 opened 8 months ago

akumbhani66 commented 8 months ago

ArcadeDB Version:

v24.1.1

OS and JDK Version:

Running on Linux 6.5.0-1014-gcp - OpenJDK 64-Bit Server VM 11.0.22 (Temurin-11.0.22+7)

Expected behavior

Select query should return the data

Actual behavior


Caused by: com.arcadedb.query.sql.parser.ParseException: Encountered <WHERE> "where" at line 1, column 30.
Was expecting one of:
    <EOF> 
    <SKIP2> ...
    <OFFSET> ...
    <TIMEOUT> ...
    ";" ...
    <SKIP2> ...
    <OFFSET> ...
    <TIMEOUT> ...

        at com.arcadedb.query.sql.parser.SqlParser.generateParseException(SqlParser.java:27557)
        at com.arcadedb.query.sql.parser.SqlParser.jj_consume_token(SqlParser.java:27402)
        at com.arcadedb.query.sql.parser.SqlParser.Parse(SqlParser.java:252)
        at ```

### Steps to reproduce

`A simple select query using [postgres driver](https://github.com/sfackler/rust-postgres) with SQL syntax. `

`SELECT * FROM Users WHERE id = 1`

NOTE:
- I tested simply copy the query and paste it to the arcade studio and it worked
- I simply changed the database connection string to point postgres database and it worked.
- Also, I tried with the [rust driver](https://github.com/wolf4ood/arcadedb-rs) for arcade db and it worked
lvca commented 8 months ago

The error says column 30, but it's not where the WHERE is. Could you please turn on POSTGRES driver debug info? Just set this in the server script: -Darcadedb.postgres.debug=true, restart the server, run the query again and please send us the result back.

akumbhani66 commented 8 months ago

The error says column 30, but it's not where the WHERE is. Could you please turn on POSTGRES driver debug info? Just set this in the server script: -Darcadedb.postgres.debug=true, restart the server, run the query again and please send us the result back.

@lvca , That is because i slightly changed the query. the exact query looks like: SELECT id FROM Users WHERE geohash = "*****"

Sorry for the confusion.

I'll still turn on the debug mode ON and will post the logs here shortly.