[BUG] `BothV()` not supported in Gremlin in Calcite-based Compiler

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp
領域
compilers

調査の方向性

指定された planner 設定で lsqb データセットに対して Gremlin クエリを再現し、その後、issue に示されている論理プランと物理プランを比較します。bothV() を処理するコンパイラパスを追跡し、物理プランに不足している GetV オペレータが含まれ、エッジではなく頂点を返す場合に処理が完了することを確認します。

索引モデルが issue の本文から書いたものです。

説明

stale

Describe the bug
A clear and concise description of what the bug is.

As titled.

Below is an example query on lsqb dataset that illustrates the problem:

gremlin>  g.V().hasLabel("city").has("id", 111).bothE("isLocatedIn").bothV()
==>e[48167737][72088380363509640-isLocatedIn->648518346341351535]
==>e[48167890][72092778410023144-isLocatedIn->648518346341351535]
==>e[48169242][72066390130974264-isLocatedIn->648518346341351535]
==>e[48170302][72057594037953336-isLocatedIn->648518346341351535]
==>e[48170858][72092778410022784-isLocatedIn->648518346341351535]
==>e[48171593][72092778410034236-isLocatedIn->648518346341351535]
...

, where bothV() is ignored.

The logical plan looks like:

 GraphLogicalProject($f0=[_], isAppend=[false])
  GraphLogicalExpand(tableConfig=[{isAll=false, tables=[isLocatedIn]}], alias=[_], opt=[BOTH])
    GraphLogicalSource(tableConfig=[{isAll=false, tables=[city]}], alias=[_], fusedFilter=[[=(_.id, 111)]], opt=[VERTEX])

and the physical plan looks like:

    operations: [
        PhysicalOpr {
            opr: Scan(
                Scan {
                    scan_opt: Vertex,
                    ...
         }
        PhysicalOpr {
            opr: Repartition(
                Repartition {
                    strategy: Some(
                        ToAnother(
                            Shuffle {
                                shuffle_key: None,
                            },
                        ),
                    ),
                },
            ),
        },
        PhysicalOpr {
            opr: Edge(
                EdgeExpand {
                    v_tag: None,
                    direction: Both,
                    params: Some(
                        QueryParams {
                            tables: [
                                NameOrId {
                                    item: Some(
                                        Id(
                                            11,
                                        ),
                                    ),
                                },
                            ],
                            columns: [],
                            is_all_columns: false,
                            limit: None,
                            predicate: None,
                            sample_ratio: 1.0,
                            extra: {},
                        },
                    ),
                    alias: None,
                    expand_opt: Edge,
                    is_optional: false,
                },
            ),
        },
        PhysicalOpr {
            opr: Project(
                Project {
                   ...})}

which miss the GetV operator for bothV().

To reproduce, compiler configuration is as follows:

graph.planner.is.on=true
graph.planner.opt=RBO
graph.planner.rules=FilterIntoJoinRule, FilterMatchRule, ExtendIntersectRule, ExpandGetVFusionRule
graph.physical.opt=proto
gremlin.script.language.name=antlr_gremlin_calcite
主要言語
C++
スター
3.6k
フォーク
470
PR マージ指標
30日以内にマージされた PR はありません

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

alibaba/GraphScope のほかの issue

alibaba/GraphScope の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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