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

Đang mở
#4,612 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
cpp
Lĩnh vực
compilers

Hướng nghiên cứu

Tái hiện truy vấn Gremlin trên tập dữ liệu lsqb với cấu hình planner được liệt kê, sau đó so sánh các logical plan và physical plan được hiển thị trong issue. Theo dõi đường dẫn compiler xử lý bothV() và xác minh quá trình hoàn tất khi physical plan bao gồm operator GetV còn thiếu và trả về các vertex thay vì edge.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
C++
Star
3.6k
Fork
470
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của alibaba/GraphScope

Tất cả issue của alibaba/GraphScope

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.