Repository navigation
Replies: 3 comments 7 replies
|
One clarification on point 2 of the suggestion, which says "for document types": that is where the standard core matters most (joins on keys, aggregation, BI tools), but it does not need to stop there. Every type can appear as a table under the same rules: a document or vertex type as a table of its records, an edge type as a link table whose rows carry their two ends ( |
|
I folded the clarification above into the suggestion in the post (point 2), and added point 3: keep ANSI SQL and Cypher each faithful to its own standard instead of making them mirror each other, with a docs page on which language to use for what. Nothing measured changed. |
|
This is an old topic always relevant. I am in favor of updating our SQL to be more standard. The idea of the join is good, when we have edges the planner should transform it in a traversal. The only reason why we never did it is because the vast majority of failure on using OrientDB and ArcadeDB we have seen so far is the lack of graph modeling. OrientDB and ArcadeDB can work as a RDBMS, but you lose the main advantage you have with a native GraphDB ending up doing many joins. Not having JOIN in our syntax forces the user to discover how to traverse relationship. After all all of us come from a RDBMS background. Any idea is welcome. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I ran two small experiments on a question for after 26.11.1, not for this release: should ArcadeDB's SQL get a standard core (ANSI joins and a real catalog) next to Cypher? More and more databases are created and queried by AI agents (Databricks reported that over 80% of the databases provisioned on Neon are created by AI agents), and agents, like BI tools and drivers, speak standard SQL and Cypher. I wanted numbers on what that means for ArcadeDB, not opinions.
Everything is reproducible from one commit: harness, pre-registered rules and scripts. The rules were written before any run; nothing below was tuned after seeing results.
1. Which query languages LLMs write correctly
40 questions over a slice of the LDBC social network (SF1: 9,892 persons, 180,623 friendships, forums, tags and places), ten each of: one type, one join, several joins, and a graph pattern. Each question was asked in five languages, zero-shot, schema plus question, "answer with the query only". Claude Sonnet 5.5 and Claude Haiku 5.5, three samples each, 1,200 generations. Every generated query was executed and its result compared with a reference answer that was itself checked on every engine. ArcadeDB 26.10.2 (latest stable); DuckDB 1.5.6 stands in for an ANSI SQL engine.
Correct answers (95% Wilson interval):
Where ArcadeDB SQL loses its answers, by question group:
The reference card answers the "agents can read the docs" objection only in part: it lifts Haiku from 71.8% to 92.3%, close to standard SQL, and Sonnet from 39.3% to 56.4%, and it has to be in every prompt.
An observation the rules did not score, but worth reporting: on languages it is unsure of, Sonnet stops following "query only" and answers with prose and several candidate queries, often saying it is not sure the syntax is valid. Answers that are not a single query: ANSI SQL 4/120, Cypher 7/120, ArcadeDB SQL 65/120, ArcadeDB SQL with the card 23/120, SQL/PGQ 59/120. Those count as failures (the extraction rule takes one query), which is largely why Sonnet scores below Haiku on ArcadeDB SQL; Haiku answers with a single query nearly always, right or wrong.
The standard SQL the models write is portable: of the 228 answers correct on DuckDB, 225/228 = 98.7% [96.2, 99.6] are also correct unchanged on PostgreSQL 18 and 219/228 = 96.1% [92.7, 97.9] on SQLite. So the result is about standard SQL, not about DuckDB's dialect.
2. What Postgres-wire tools can do today
Six common clients against the Postgres wire, each step a pass or fail. Each cell reads 26.10.2 / the 26.11.1 snapshot (which has the catalog fixes made after #10228):
What fails, from the server's errors: every JOIN ("mismatched input 'JOIN'"); the catalog queries psycopg, Grafana and Metabase send return no tables (psql's
\dtworks on the snapshot); SQLAlchemy'sLIMIT $1::INTEGERis a parse error on 26.10.2 and its reflection query is refused on the snapshot ("This catalog query has a shape this server does not support"); Grafana's health check-- pingis rejected as an empty statement. The catalog emulation improves release by release, but every client sends its own catalog queries, and every client's JOIN fails.3. What others do, and the counterpoints
$lookup, ArangoDB AQL, SurrealQL.4. A suggestion, for after 26.11.1
INNERandLEFT JOINon equality using indexes, standard casts (::andCAST), empty and comment-only statements, and catalog queries (pg_catalog,information_schema) answered by the engine over its schema instead of shape by shape. Documents are where it matters most, but every type can appear as a table: a document or vertex type as a table of its records, an edge type as a link table whose rows carry their two ends (@out,@in) and the edge properties, so tools can list and query all of them. The existing dialect stays as it is.NULLlogic, the catalog), openCypher moving toward GQL for Cypher (patterns, paths). Both read the same records in the same transactions, and a docs page says which language to use for what: Cypher for traversals and patterns, SQL for documents, tables and tools, the existing dialect for what neither covers.The 40 questions and the tool matrix could become acceptance tests: the matrix runs against a snapshot in a few minutes and shows which clients a change unblocks. I am happy to help: turn them into a CI job, test branches, or send PRs for parts of the core where that is useful to you.
Limits: one schema; Claude models only; DuckDB stands in for an ANSI core ArcadeDB does not have yet; the LLM figures use ArcadeDB 26.10.2.
Edited 2026-11-05: point 2 now says that every type, edge types included, can appear as a table, and point 3 that each language stays faithful to its own standard (both from the discussion below); nothing measured changed.
All reactions