You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by GitBox <gi...@apache.org> on 2021/04/12 04:09:11 UTC

[GitHub] [incubator-age] emotionbug opened a new issue #52: exists `label(...)` function in AGE?

emotionbug opened a new issue #52:
URL: https://github.com/apache/incubator-age/issues/52


   I want to querying label as row. but, i can't find `label` function like AgensGraph or Neo4j.
   so, currently using follow function,  `ag_catalog._label_name(oid, v | e)` like behind.
   
   i think it is not suitable to use.
   
   so, any other ways to querying to get label string?
   
   
   ```sql
   -- $schema_name
   SELECT label, count(label) as cnt
   FROM (
            SELECT ag_catalog._label_name(oid, v)::text as label
            from cypher('$schema_name', $$
                MATCH (V)
                RETURN id(V)
                $$) as (V agtype), (SELECT oid FROM ag_catalog.ag_graph where name = '$schema_name') as oid
        ) b
   GROUP BY b.label;
   ```


-- 
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.

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



[GitHub] [incubator-age] emotionbug commented on issue #52: exists `label(...)` function in AGE?

Posted by GitBox <gi...@apache.org>.
emotionbug commented on issue #52:
URL: https://github.com/apache/incubator-age/issues/52#issuecomment-822028134


   I know that `label` function of Neo4j is `labels(..)`, not `label(..)`, because supports multi label feature.
   
   maybe, AGE will not support multi-label feature. so, near feature planning be `labels(..)` function will be returning all inheritance labels?


-- 
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.

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



[GitHub] [incubator-age] JoshInnis commented on issue #52: exists `label(...)` function in AGE?

Posted by GitBox <gi...@apache.org>.
JoshInnis commented on issue #52:
URL: https://github.com/apache/incubator-age/issues/52#issuecomment-821736186


   The label function has been added.
   
   ```
   SELECT *
   FROM cypher('$schema_name', $$
       MATCH (V)
       RETURN label(V), count(*)
   $$) as (label agtype, cnt agtype)
   ```
   
   The label function is not in Neo4J. Neo4J has the labels function which returns a list of all the vertex's/edge's labels. Since AgensGraph uses label inheritance that function to list the vertex's/edge's label, it's parents and all ancestor labels. The label function just returns a string of the entity's exact label. Currently label is implemented and labels is not.


-- 
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.

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



[GitHub] [incubator-age] JoshInnis closed issue #52: exists `label(...)` function in AGE?

Posted by GitBox <gi...@apache.org>.
JoshInnis closed issue #52:
URL: https://github.com/apache/incubator-age/issues/52


   


-- 
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.

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



[GitHub] [incubator-age] emotionbug edited a comment on issue #52: exists `label(...)` function in AGE?

Posted by GitBox <gi...@apache.org>.
emotionbug edited a comment on issue #52:
URL: https://github.com/apache/incubator-age/issues/52#issuecomment-822028134


   https://github.com/apache/incubator-age/commit/9b89a311eb59d51fd8cc2f0798ad895c7594afbd
   Thanks!
   
   And, I know that `label` function of Neo4j is `labels(..)`, not `label(..)`, because supports multi-label feature.
   
   maybe, AGE will not support multi-label feature. so, near feature planning be `labels(..)` function will be returning all inheritance labels?


-- 
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.

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



[GitHub] [incubator-age] JoshInnis commented on issue #52: exists `label(...)` function in AGE?

Posted by GitBox <gi...@apache.org>.
JoshInnis commented on issue #52:
URL: https://github.com/apache/incubator-age/issues/52#issuecomment-860827312


   That is the plan. Label Inheritance is not currently implemented. But we have that on the backlog and the plan is for that function to return it's label all labels it inherits.  


-- 
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.

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