Redshift dialect: `--` comment should end at a carriage return

オープン
#2,958 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

この issue はまだ評価されていません。

説明

Redshift

In the Redshift dialect a -- comment runs to the next \n, but Redshift ends it at a lone \r too, as Postgres does. sqlparser already stops at \r for PostgreSqlDialect (tokenizer tokenize_single_line_comment).

select 1 as a --\r, pg_backend_pid()

(\r is a literal carriage return.)

  • sqlparser 0.64.0: SingleLineComment("\r, pg_backend_pid()"); parses as SELECT 1 AS a.
  • Redshift: two columns, a = 1, pg_backend_pid = 1073905994.

Redshift is based on PostgreSQL 8.0.2 (https://docs.aws.amazon.com/redshift/latest/dg/c_redshift-and-postgres-sql.html), whose lexer treats both \n and \r as newlines. Could RedshiftSqlDialect share the Postgres behavior here?

主要言語
Rust
スター
3.5k
フォーク
805
平均マージ
2日 3時間
マージ済み PR(30日)
116

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/datafusion-sqlparser-rs のほかの issue

apache/datafusion-sqlparser-rs の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。