You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "LiJie20190102 (via GitHub)" <gi...@apache.org> on 2024/11/26 06:18:44 UTC

[PR] fix(client): When calling the 'kneigbor' interface and returning the … [incubator-hugegraph-toolchain]

LiJie20190102 opened a new pull request, #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644

   …result, scenarios where 'withPath' is' true 'and' false 'are incompatible (#643)
   
   <!-- 
     Thank you very much for contributing to Apache HugeGraph, we are happy that you want to help us improve it!
   
     Here are some tips for you:
       1. If this is your first time, please read the [contributing guidelines](https://github.com/apache/hugegraph/blob/master/CONTRIBUTING.md)
   
       2. If a PR fix/close an issue, type the message "close xxx" (xxx is the link of related 
   issue) in the content, GitHub will auto link it (Required)
   
       3. Name the PR title in "Google Commit Format", start with "feat | fix | perf | refactor | doc | chore", 
         such like: "feat(core): support the PageRank algorithm" or "fix: wrong break in the compute loop" (module is optional)
         skip it if you are unsure about which is the best component.
   
       4. One PR address one issue, better not to mix up multiple issues.
   
       5. Put an `x` in the `[ ]` to mark the item as CHECKED. `[x]` (or click it directly after 
   published)
   -->
   
   ## Purpose of the PR
   
   - close #xxx  <!-- or use "fix #xxx", "xxx" is the ID-link of related issue, e.g: close #1024 -->
   
   <!--
   Please explain more context in this section, clarify why the changes are needed. 
   e.g:
   - If you propose a new API, clarify the use case for a new API.
   - If you fix a bug, you can clarify why it is a bug, and should be associated with an issue.
   -->
   
   ## Main Changes
   
   <!-- Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. These change logs are helpful for better ant faster reviews.)
   
   For example:
   
   - If you introduce a new feature, please show detailed design here or add the link of design documentation.
   - If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
   - If there is a discussion in the mailing list, please add the link. -->
   
   ## Verifying these changes
   
   <!-- Please pick the proper options below -->
   
   - [ ] Trivial rework / code cleanup without any test coverage. (No Need)
   - [ ] Already covered by existing tests, such as *(please modify tests here)*.
   - [ ] Need tests and can be verified as follows:
       - xxx
   
   ## Does this PR potentially affect the following parts?
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ]  Nope
   - [ ]  Dependencies (add/update license info) <!-- Don't forget to add/update the info in "LICENSE" & "NOTICE" files (both in root & dist module) -->
   - [ ]  Modify configurations
   - [ ]  The public API
   - [ ]  Other affects (typed here)
   
   ## Documentation Status
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ]  `Doc - TODO` <!-- Your PR changes impact docs and you will update later -->
   - [ ]  `Doc - Done` <!-- Related docs have been already added or updated -->
   - [ ]  `Doc - No Need` <!-- Your PR changes don't impact/need docs -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): When calling the 'kneigbor' interface and returning the … [incubator-hugegraph-toolchain]

Posted by "LiJie20190102 (via GitHub)" <gi...@apache.org>.
LiJie20190102 commented on PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#issuecomment-2499774426

   @imbajin  @VGalaxies   Please help review it


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): kneigbor-api has unmatched edge type with server [incubator-hugegraph-toolchain]

Posted by "LiJie20190102 (via GitHub)" <gi...@apache.org>.
LiJie20190102 commented on code in PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#discussion_r1860190662


##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   if with_idge is false:
   `{
   	"kneighbor": [
   		"2:car1!2",
   		"2:car2!4"
   	],
   	"size": 2,
   	"paths": [
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car1!2"
   			]
   		},
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car2!4"
   			]
   		}
   	],
   	"vertices": [
   		{
   			"id": "2:car2!4",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 4,
   				"qsdi_task_id": "car2_task_id_test",
   				"qsdi_record_id": "test_record_id",
   				"name": "car2",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "1:zhangsan",
   			"label": "people",
   			"type": "vertex",
   			"properties": {
   				"age": 55,
   				"qsdi_record_id": "926133154860048384",
   				"name": "zhangsan",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "2:car1!2",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 2,
   				"qsdi_task_id": "car1_task_id_test",
   				"qsdi_record_id": "car1_log_id_test",
   				"name": "car1",
   				"qsdi_data_source": "1"
   			}
   		}
   	],
   	"edges": [
   		"S1:zhangsan>3>3>>S2:car2!4",
   		"S1:zhangsan>3>3>>S2:car1!2"
   	]
   }`
   
   
   
   if with_idge is true:
   `{
   	"kneighbor": [
   		"2:car1!2",
   		"2:car2!4"
   	],
   	"size": 2,
   	"paths": [
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car1!2"
   			]
   		},
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car2!4"
   			]
   		}
   	],
   	"vertices": [
   		{
   			"id": "2:car2!4",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 4,
   				"qsdi_task_id": "car2_task_id_test",
   				"qsdi_record_id": "test_record_id",
   				"name": "car2",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "1:zhangsan",
   			"label": "people",
   			"type": "vertex",
   			"properties": {
   				"age": 55,
   				"qsdi_record_id": "926133154860048384",
   				"name": "zhangsan",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "2:car1!2",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 2,
   				"qsdi_task_id": "car1_task_id_test",
   				"qsdi_record_id": "car1_log_id_test",
   				"name": "car1",
   				"qsdi_data_source": "1"
   			}
   		}
   	],
   	"edges": [
   		{
   			"id": "S1:zhangsan>3>3>>S2:car2!4",
   			"label": "driver_single",
   			"type": "edge",
   			"outV": "1:zhangsan",
   			"outVLabel": "people",
   			"inV": "2:car2!4",
   			"inVLabel": "car",
   			"properties": {
   				"qsdi_task_id": "zhangsan_car2_rask_id_test",
   				"qsdi_record_id": "926133802515111937",
   				"name": "ride12",
   				"driver_count": 23,
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "S1:zhangsan>3>3>>S2:car1!2",
   			"label": "driver_single",
   			"type": "edge",
   			"outV": "1:zhangsan",
   			"outVLabel": "people",
   			"inV": "2:car1!2",
   			"inVLabel": "car",
   			"properties": {
   				"qsdi_record_id": "926133804008284160",
   				"name": "ride88",
   				"driver_count": 88,
   				"qsdi_data_source": "1"
   			}
   		}
   	]
   }`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): When calling the 'kneigbor' interface and returning the … [incubator-hugegraph-toolchain]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#discussion_r1858030473


##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   Although using `<?>` may take effect(no add/update operation here), it is still strange why the restriction of generics has been modified to arbitrary here. 
   
   It is possible that the **server-side** changes did not meet expectations? 
   
   Wanna to know in what case do I need to pass in a non-Edge Edge?(Is it because the definition of server-side generics is too broad?)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): kneigbor-api has unmatched edge type with server [incubator-hugegraph-toolchain]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#discussion_r1860220361


##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   THX, could try to submit a PR in server (or in your own forked repo to test the CI)
   
   BTW, test/ in local env is also fine:)
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): kneigbor-api has unmatched edge type with server [incubator-hugegraph-toolchain]

Posted by "LiJie20190102 (via GitHub)" <gi...@apache.org>.
LiJie20190102 commented on code in PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#discussion_r1859559096


##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   server code 
   org.apache.hugegraph.api.traversers.KneighborAPI#post
   ![image](https://github.com/user-attachments/assets/a7fe9a41-4770-4b82-920a-ae2b10c9b8e8)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): kneigbor-api has unmatched edge type with server [incubator-hugegraph-toolchain]

Posted by "LiJie20190102 (via GitHub)" <gi...@apache.org>.
LiJie20190102 commented on code in PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#discussion_r1860078383


##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   How about this:
   ![image](https://github.com/user-attachments/assets/e8d23fbb-57fc-4c77-9c73-d8f452d126f2)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): kneigbor-api has unmatched edge type with server [incubator-hugegraph-toolchain]

Posted by "javeme (via GitHub)" <gi...@apache.org>.
javeme commented on code in PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#discussion_r1892602979


##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   after https://github.com/apache/incubator-hugegraph/pull/2699 merged, we don't need to change `Set<Edge> edges`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): When calling the 'kneigbor' interface and returning the … [incubator-hugegraph-toolchain]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#discussion_r1858030473


##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   Although using `<?>` may take effect, it is still strange why the restriction of generics has been modified to arbitrary here. 
   
   It is possible that the **server-side** changes did not meet expectations? 
   
   Wanna to know in what case do I need to pass in a non-Edge Edge?(Is it because the definition of server-side generics is too broad?)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): kneigbor-api has unmatched edge type with server [incubator-hugegraph-toolchain]

Posted by "LiJie20190102 (via GitHub)" <gi...@apache.org>.
LiJie20190102 commented on code in PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#discussion_r1860192546


##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   > > ow about this:If 'with_idge' is' false ', we will not return any information about the edge; If 'with-vertex' is' false 'and does not return vertex information, the' kneigbor 'parameter has already returned a set of vertex IDs
   > 
   > Looks okay, but what effect does the **iterator returned** earlier? Do you have to test what the potential effect is there? See if the test can pass rightly
   
   if with_idge is false:
   `{
   	"kneighbor": [
   		"2:car1!2",
   		"2:car2!4"
   	],
   	"size": 2,
   	"paths": [
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car1!2"
   			]
   		},
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car2!4"
   			]
   		}
   	],
   	"vertices": [
   		{
   			"id": "2:car2!4",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 4,
   				"qsdi_task_id": "car2_task_id_test",
   				"qsdi_record_id": "test_record_id",
   				"name": "car2",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "1:zhangsan",
   			"label": "people",
   			"type": "vertex",
   			"properties": {
   				"age": 55,
   				"qsdi_record_id": "926133154860048384",
   				"name": "zhangsan",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "2:car1!2",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 2,
   				"qsdi_task_id": "car1_task_id_test",
   				"qsdi_record_id": "car1_log_id_test",
   				"name": "car1",
   				"qsdi_data_source": "1"
   			}
   		}
   	],
   	"edges": [
   		"S1:zhangsan>3>3>>S2:car2!4",
   		"S1:zhangsan>3>3>>S2:car1!2"
   	]
   }`
   
   
   
   if with_idge is true:
   `{
   	"kneighbor": [
   		"2:car1!2",
   		"2:car2!4"
   	],
   	"size": 2,
   	"paths": [
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car1!2"
   			]
   		},
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car2!4"
   			]
   		}
   	],
   	"vertices": [
   		{
   			"id": "2:car2!4",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 4,
   				"qsdi_task_id": "car2_task_id_test",
   				"qsdi_record_id": "test_record_id",
   				"name": "car2",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "1:zhangsan",
   			"label": "people",
   			"type": "vertex",
   			"properties": {
   				"age": 55,
   				"qsdi_record_id": "926133154860048384",
   				"name": "zhangsan",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "2:car1!2",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 2,
   				"qsdi_task_id": "car1_task_id_test",
   				"qsdi_record_id": "car1_log_id_test",
   				"name": "car1",
   				"qsdi_data_source": "1"
   			}
   		}
   	],
   	"edges": [
   		{
   			"id": "S1:zhangsan>3>3>>S2:car2!4",
   			"label": "driver_single",
   			"type": "edge",
   			"outV": "1:zhangsan",
   			"outVLabel": "people",
   			"inV": "2:car2!4",
   			"inVLabel": "car",
   			"properties": {
   				"qsdi_task_id": "zhangsan_car2_rask_id_test",
   				"qsdi_record_id": "926133802515111937",
   				"name": "ride12",
   				"driver_count": 23,
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "S1:zhangsan>3>3>>S2:car1!2",
   			"label": "driver_single",
   			"type": "edge",
   			"outV": "1:zhangsan",
   			"outVLabel": "people",
   			"inV": "2:car1!2",
   			"inVLabel": "car",
   			"properties": {
   				"qsdi_record_id": "926133804008284160",
   				"name": "ride88",
   				"driver_count": 88,
   				"qsdi_data_source": "1"
   			}
   		}
   	]
   }`



##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   if with_idge is false:
   `{
   	"kneighbor": [
   		"2:car1!2",
   		"2:car2!4"
   	],
   	"size": 2,
   	"paths": [
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car1!2"
   			]
   		},
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car2!4"
   			]
   		}
   	],
   	"vertices": [
   		{
   			"id": "2:car2!4",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 4,
   				"qsdi_task_id": "car2_task_id_test",
   				"qsdi_record_id": "test_record_id",
   				"name": "car2",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "1:zhangsan",
   			"label": "people",
   			"type": "vertex",
   			"properties": {
   				"age": 55,
   				"qsdi_record_id": "926133154860048384",
   				"name": "zhangsan",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "2:car1!2",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 2,
   				"qsdi_task_id": "car1_task_id_test",
   				"qsdi_record_id": "car1_log_id_test",
   				"name": "car1",
   				"qsdi_data_source": "1"
   			}
   		}
   	],
   	"edges": [
   		"S1:zhangsan>3>3>>S2:car2!4",
   		"S1:zhangsan>3>3>>S2:car1!2"
   	]
   }`
   
   
   
   if with_idge is true:
   `{
   	"kneighbor": [
   		"2:car1!2",
   		"2:car2!4"
   	],
   	"size": 2,
   	"paths": [
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car1!2"
   			]
   		},
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car2!4"
   			]
   		}
   	],
   	"vertices": [
   		{
   			"id": "2:car2!4",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 4,
   				"qsdi_task_id": "car2_task_id_test",
   				"qsdi_record_id": "test_record_id",
   				"name": "car2",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "1:zhangsan",
   			"label": "people",
   			"type": "vertex",
   			"properties": {
   				"age": 55,
   				"qsdi_record_id": "926133154860048384",
   				"name": "zhangsan",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "2:car1!2",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 2,
   				"qsdi_task_id": "car1_task_id_test",
   				"qsdi_record_id": "car1_log_id_test",
   				"name": "car1",
   				"qsdi_data_source": "1"
   			}
   		}
   	],
   	"edges": [
   		{
   			"id": "S1:zhangsan>3>3>>S2:car2!4",
   			"label": "driver_single",
   			"type": "edge",
   			"outV": "1:zhangsan",
   			"outVLabel": "people",
   			"inV": "2:car2!4",
   			"inVLabel": "car",
   			"properties": {
   				"qsdi_task_id": "zhangsan_car2_rask_id_test",
   				"qsdi_record_id": "926133802515111937",
   				"name": "ride12",
   				"driver_count": 23,
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "S1:zhangsan>3>3>>S2:car1!2",
   			"label": "driver_single",
   			"type": "edge",
   			"outV": "1:zhangsan",
   			"outVLabel": "people",
   			"inV": "2:car1!2",
   			"inVLabel": "car",
   			"properties": {
   				"qsdi_record_id": "926133804008284160",
   				"name": "ride88",
   				"driver_count": 88,
   				"qsdi_data_source": "1"
   			}
   		}
   	]
   }`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): kneigbor-api has unmatched edge type with server [incubator-hugegraph-toolchain]

Posted by "LiJie20190102 (via GitHub)" <gi...@apache.org>.
LiJie20190102 commented on code in PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#discussion_r1860192546


##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   > > ow about this:If 'with_idge' is' false ', we will not return any information about the edge; If 'with-vertex' is' false 'and does not return vertex information, the' kneigbor 'parameter has already returned a set of vertex IDs
   > 
   > Looks okay, but what effect does the **iterator returned** earlier? Do you have to test what the potential effect is there? See if the test can pass rightly
   
   if with_edge is false:
   `{
   	"kneighbor": [
   		"2:car1!2",
   		"2:car2!4"
   	],
   	"size": 2,
   	"paths": [
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car1!2"
   			]
   		},
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car2!4"
   			]
   		}
   	],
   	"vertices": [
   		{
   			"id": "2:car2!4",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 4,
   				"qsdi_task_id": "car2_task_id_test",
   				"qsdi_record_id": "test_record_id",
   				"name": "car2",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "1:zhangsan",
   			"label": "people",
   			"type": "vertex",
   			"properties": {
   				"age": 55,
   				"qsdi_record_id": "926133154860048384",
   				"name": "zhangsan",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "2:car1!2",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 2,
   				"qsdi_task_id": "car1_task_id_test",
   				"qsdi_record_id": "car1_log_id_test",
   				"name": "car1",
   				"qsdi_data_source": "1"
   			}
   		}
   	],
   	"edges": [
   		"S1:zhangsan>3>3>>S2:car2!4",
   		"S1:zhangsan>3>3>>S2:car1!2"
   	]
   }`
   
   
   
   if with_edge is true:
   `{
   	"kneighbor": [
   		"2:car1!2",
   		"2:car2!4"
   	],
   	"size": 2,
   	"paths": [
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car1!2"
   			]
   		},
   		{
   			"objects": [
   				"1:zhangsan",
   				"2:car2!4"
   			]
   		}
   	],
   	"vertices": [
   		{
   			"id": "2:car2!4",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 4,
   				"qsdi_task_id": "car2_task_id_test",
   				"qsdi_record_id": "test_record_id",
   				"name": "car2",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "1:zhangsan",
   			"label": "people",
   			"type": "vertex",
   			"properties": {
   				"age": 55,
   				"qsdi_record_id": "926133154860048384",
   				"name": "zhangsan",
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "2:car1!2",
   			"label": "car",
   			"type": "vertex",
   			"properties": {
   				"age": 2,
   				"qsdi_task_id": "car1_task_id_test",
   				"qsdi_record_id": "car1_log_id_test",
   				"name": "car1",
   				"qsdi_data_source": "1"
   			}
   		}
   	],
   	"edges": [
   		{
   			"id": "S1:zhangsan>3>3>>S2:car2!4",
   			"label": "driver_single",
   			"type": "edge",
   			"outV": "1:zhangsan",
   			"outVLabel": "people",
   			"inV": "2:car2!4",
   			"inVLabel": "car",
   			"properties": {
   				"qsdi_task_id": "zhangsan_car2_rask_id_test",
   				"qsdi_record_id": "926133802515111937",
   				"name": "ride12",
   				"driver_count": 23,
   				"qsdi_data_source": "1"
   			}
   		},
   		{
   			"id": "S1:zhangsan>3>3>>S2:car1!2",
   			"label": "driver_single",
   			"type": "edge",
   			"outV": "1:zhangsan",
   			"outVLabel": "people",
   			"inV": "2:car1!2",
   			"inVLabel": "car",
   			"properties": {
   				"qsdi_record_id": "926133804008284160",
   				"name": "ride88",
   				"driver_count": 88,
   				"qsdi_data_source": "1"
   			}
   		}
   	]
   }`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): kneigbor-api has unmatched edge type with server [incubator-hugegraph-toolchain]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin closed pull request #644: fix(client): kneigbor-api has unmatched edge type with server
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): kneigbor-api has unmatched edge type with server [incubator-hugegraph-toolchain]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#discussion_r1860026475


##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   > server code org.apache.hugegraph.api.traversers.KneighborAPI#post ![image](https://private-user-images.githubusercontent.com/53458004/390212190-a7fe9a41-4770-4b82-920a-ae2b10c9b8e8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzI2OTAwNTIsIm5iZiI6MTczMjY4OTc1MiwicGF0aCI6Ii81MzQ1ODAwNC8zOTAyMTIxOTAtYTdmZTlhNDEtNDc3MC00YjgyLTkyMGEtYWUyYjEwYzliOGU4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDExMjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMTI3VDA2NDIzMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIyYmZiYzljZjJmOWMyNWI5YzA4ZDEyYWE2YWYyNWY5ZGI3NmU1NGIwNWQ5NTQyYzcyZWI2M2NlZWFjODM4NDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.QLeDfedr0nbkfGtSh4PB3HTPgf4YxeAsr7uSdtxLszA)
   
   I mean the change in `server` maybe not suitable.
   
   A better approach could be to adjust the `<>` type of server? You can take a look at it
   <img width="1469" alt="image" src="https://github.com/user-attachments/assets/ca0ce881-b0ae-4ff1-a899-fa569ef76805">
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): kneigbor-api has unmatched edge type with server [incubator-hugegraph-toolchain]

Posted by "LiJie20190102 (via GitHub)" <gi...@apache.org>.
LiJie20190102 commented on code in PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#discussion_r1860078383


##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   How about this:If 'with_idge' is' false ', we will not return any information about the edge; If 'with-vertex' is' false 'and does not return vertex information, the' kneigbor 'parameter has already returned a set of vertex IDs
   ![image](https://github.com/user-attachments/assets/e8d23fbb-57fc-4c77-9c73-d8f452d126f2)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] fix(client): kneigbor-api has unmatched edge type with server [incubator-hugegraph-toolchain]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #644:
URL: https://github.com/apache/incubator-hugegraph-toolchain/pull/644#discussion_r1860165266


##########
hugegraph-client/src/main/java/org/apache/hugegraph/structure/traverser/Kneighbor.java:
##########
@@ -37,7 +37,7 @@ public class Kneighbor {
     @JsonProperty
     private Set<Vertex> vertices;
     @JsonProperty
-    private Set<Edge> edges;
+    private Set<?> edges;

Review Comment:
   > ow about this:If 'with_idge' is' false ', we will not return any information about the edge; If 'with-vertex' is' false 'and does not return vertex information, the' kneigbor 'parameter has already returned a set of vertex IDs
   
   Looks okay, but what effect does the **iterator returned** earlier? Do you have to test what the potential effect is there? See if the test can pass rightly
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org