Add a Presto dialect

Offen
#2,611 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
rust, sql
Bereich
compilers, databases

Rechercherichtung

Start by reading the existing dialect implementations and the Dialect flags for FILTER, grouping sets, and lambdas; compare identifier rules with Presto's linked SqlBase.g4 grammar. Then locate how the lexer handles identifier characters and quote delimiters. Done means a PrestoDialect supports the proposed identifier rules and shared syntax; time travel and CREATE FUNCTION are explicitly out of scope.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

BigQuery Hive MySQL

Presto is a distributed SQL query engine created at Facebook in 2012 and governed since 2019 by the Presto Foundation under the Linux Foundation, with members including Uber, Alibaba and IBM (which ships it in watsonx.data).

Differences in Presto's grammar (SqlBase.g4) from the existing dialects:

  • Unquoted identifiers may contain @ and : after the first character, so events:analytics is a single identifier. No existing dialect lexes this. (#2604 covers dialects that need such names split into parts.)
  • Only double quotes delimit identifiers. Backquotes, which MySQL, Hive and BigQuery accept, are rejected.
  • Time travel accepts FOR {SYSTEM_TIME | SYSTEM_VERSION | TIMESTAMP | VERSION} {AS OF | BEFORE} expr. Today the parser models only FOR SYSTEM_TIME AS OF from this family.

Proposal: a PrestoDialect with these identifier rules, plus the existing Dialect flags for syntax Presto shares with other engines (FILTER (WHERE ...), GROUPING SETS/CUBE/ROLLUP, lambdas). Time travel and CREATE FUNCTION need AST changes and can follow separately.

Vorherrschende Sprache
Rust
Sterne
3.5k
Forks
805
Ø Merge
2 T. 3 Std.
Gemergte PRs (30 T.)
116

Entwicklungsumgebung

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus apache/datafusion-sqlparser-rs

Alle Issues in apache/datafusion-sqlparser-rs

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.