Repository: alibaba/GraphScope (language: python)

Issue:
[BUG] unexpected results for path expand in GIE
**Describe the bug**

Run the query on modern graph, and it outputs unexpected results:
```
g.V().both("1..4").with('RESULT_OPT', 'ALL_V_E').with('PATH_OPT', 'SIMPLE').endV().hasId(1)
```
The output error message is:
```
[Execution Error]: user error: kind(Unknown), caused by:Op not supported error in exec Get end edge on a path entry
```



Discussion / hints:

Fix patch:
diff --git a/interactive_engine/executor/ir/runtime/src/process/operator/map/get_v.rs b/interactive_engine/executor/ir/runtime/src/process/operator/map/get_v.rs
index f9232d529602..55a3613b5c85 100644
--- a/interactive_engine/executor/ir/runtime/src/process/operator/map/get_v.rs
+++ b/interactive_engine/executor/ir/runtime/src/process/operator/map/get_v.rs
@@ -107,8 +107,11 @@ impl FilterMapFunction<Record, Record> for GetVertexOperator {
                                 label.cloned(),
                                 DynDetails::default(),
                             );
-                            graph_path.append(vertex);
-                            Ok(Some(input))
+                            if graph_path.append(vertex) {
+                                Ok(Some(input))
+                            } else {
+                                Ok(None)
+                            }
                         } else {
                             Ok(None)
                         }


Test patch:
diff --git a/interactive_engine/executor/ir/integrated/tests/pathxd_test.rs b/interactive_engine/executor/ir/integrated/tests/pathxd_test.rs
index 9cf650772a45..773ddabcbefd 100644
--- a/interactive_engine/executor/ir/integrated/tests/pathxd_test.rs
+++ b/interactive_engine/executor/ir/integrated/tests/pathxd_test.rs
@@ -1078,4 +1078,93 @@ mod test {
         result_collection.sort();
         assert_eq!(result_collection, expected_result_collection);
     }
+
+    // g.V().hasLabel("person").both("3..4").with('RESULT_OPT', 'ALL_V_E').with('PATH_OPT', 'SIMPLE').endV().values("name")
+    #[test]
+    fn path_expand_endv_project_test() {
+        let source_opr = pb::Scan {
+            scan_opt: 0,
+            alias: None,
+            params: Some(query_params(vec![PERSON_LABEL.into()], vec![], None)),
+            idx_predicate: None,
+            is_count_only: false,
+            meta_data: None,
+        };
+
+        let edge_expand = pb::EdgeExpand {
+            v_tag: None,
+            direction: 2,
+            params: Some(query_params(vec![], vec![], None)),
+            expand_opt: 0,
+            alias: None,
+            meta_data: None,
+        };
+
+        let path_expand_opr = pb::PathExpand {
+            base: Some(edge_expand.into()),
+            start_tag: None,
+            alias: None,
+            hop_range: Some(pb::Range { lower: 3, upper: 4 }),
+            path_opt: 1,   // Simple
+            result_opt: 2, // AllVE
+            condition: None,
+        };
+
+        let path_end = pb::GetV {
+            tag: None,
+            opt: 1, // endV
+            params: None,
+            alias: None,
+            meta_data: None,
+        };
+
+        let project_opr = pb::Project {
+            mappings: vec![pb::project::ExprAlias {
+                expr: Some(str_to_expr_pb("@.name".to_string()).unwrap()),
+                alias: None,
+            }],
+            is_append: true,
+            meta_data: vec![],
+        };
+
+        let mut job_builder = JobBuilder::default();
+        job_builder.add_scan_source(source_opr);
+        job_builder.shuffle(None);
+        job_builder.path_expand(path_expand_opr);
+        job_builder.get_v(path_end);
+        job_builder.project(project_opr);
+        job_builder.sink(default_sink_pb());
+
+        let request = job_builder.build().unwrap();
+
+        initialize();
+        let mut results = submit_query(request, 2);
+
+        let mut expected_result_collection: Vec<String> = vec![
+            "marko", "josh", "josh", "peter", "peter", "peter", "vadas", "vadas", "lop", "ripple",
+            "ripple", "ripple",
+        ]
+        .into_iter()
+        .map(|name| name.to_string())
+        .collect();
+
+        let mut result_collection = vec![];
+
+        while let Some(result) = results.next() {
+            match result {
+                Ok(res) => {
+                    let entry = parse_result(res).unwrap();
+                    if let Some(v) = entry.get(None).unwrap().as_object() {
+                        result_collection.push(v.to_string());
+                    }
+                }
+                Err(e) => {
+                    panic!("err result {:?}", e);
+                }
+            }
+        }
+        expected_result_collection.sort();
+        result_collection.sort();
+        assert_eq!(result_collection, expected_result_collection);
+    }
 }