You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@age.apache.org by "CapnSpek (via GitHub)" <gi...@apache.org> on 2023/10/15 14:21:55 UTC
[I] `SET` and `DETACH DELETE` do not work when `VERBOSE` is added to `EXPLAIN ANALYZE` [age]
CapnSpek opened a new issue, #1278:
URL: https://github.com/apache/age/issues/1278
**Describe the bug**
`EXPLAIN ANALYZE VERBOSE` query will not work with `DETACH DELETE` and `SET` queries.
Error message
```
2023-10-15 17:16:43.423 EEST [161353] ERROR: cannot display a value of type internal
2023-10-15 17:16:43.423 EEST [161353] STATEMENT: SELECT * FROM cypher('xyz', $$ EXPLAIN ANALYZE VERBOSE MATCH (n:Person {age:24}) SET n.age=25 $$) AS (x agtype);
ERROR: cannot display a value of type internal
```
**How are you accessing AGE (Command line, driver, etc.)?**
Accessing AGE through command line.
**What data setup do we need to do?**
Apache AGE (master branch) with PGSQL15.
**What is the necessary configuration info needed?**
Create a graph and a pair of vertices.
```
SELECT * FROM cypher('xyz', $$ CREATE (n:Person {age:24})-[e:Knows]->(m:Person {age:25}) $$) AS (x agtype);
```
**What is the command that caused the error?**
```
SELECT * FROM cypher('xyz', $$ EXPLAIN ANALYZE VERBOSE MATCH (n:Person {age:24}) SET n.age=25 $$) AS (x agtype);
```
**ERROR**
```
2023-10-15 17:21:10.744 EEST [161353] ERROR: cannot display a value of type internal
2023-10-15 17:21:10.744 EEST [161353] STATEMENT: SELECT * FROM cypher('xyz', $$ EXPLAIN ANALYZE VERBOSE MATCH (n:Person {age:24}) SET n.age=25 $$) AS (x agtype);
ERROR: cannot display a value of type internal
```
**Expected behavior**
Expected the query to execute successfully.
**Environment (please complete the following information):**
- Version: [e.g. 0.4.0]
**Additional context**
Add any other context about the problem here.
--
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: dev-unsubscribe@age.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `SET` and `DETACH DELETE` do not work when `VERBOSE` is added to `EXPLAIN ANALYZE` [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1278:
URL: https://github.com/apache/age/issues/1278#issuecomment-1783246850
@CapnSpek If this answered or resolved you issue, please consider closing 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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `SET` and `DETACH DELETE` do not work when `VERBOSE` is added to `EXPLAIN ANALYZE` [age]
Posted by "jrgemignani (via GitHub)" <gi...@apache.org>.
jrgemignani commented on issue #1278:
URL: https://github.com/apache/age/issues/1278#issuecomment-1769205913
I'm not sure that it is possible to expand EXPLAIN to see or do anything with a custom scan node.
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `SET` and `DETACH DELETE` do not work when `VERBOSE` is added to `EXPLAIN ANALYZE` [age]
Posted by "CapnSpek (via GitHub)" <gi...@apache.org>.
CapnSpek closed issue #1278: `SET` and `DETACH DELETE` do not work when `VERBOSE` is added to `EXPLAIN ANALYZE`
URL: https://github.com/apache/age/issues/1278
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `SET` and `DETACH DELETE` do not work when `VERBOSE` is added to `EXPLAIN ANALYZE` [age]
Posted by "rafsun42 (via GitHub)" <gi...@apache.org>.
rafsun42 commented on issue #1278:
URL: https://github.com/apache/age/issues/1278#issuecomment-1764903693
@CapnSpek the EXPLAIN command was added for the developers for debugging purpose only. So, it may not be complete.
For your case, VERBOSE does not seem to work when a custom scan node is present in the plan. Does VERBOSE with custom scan nodes add value to debugging?
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `SET` and `DETACH DELETE` do not work when `VERBOSE` is added to `EXPLAIN ANALYZE` [age]
Posted by "CapnSpek (via GitHub)" <gi...@apache.org>.
CapnSpek commented on issue #1278:
URL: https://github.com/apache/age/issues/1278#issuecomment-1763406919
More information:
The query executes successfully if the labels of the supposed query do not actually exist in the graph:
(The graph still contains only the above mentioned 2 labels and 1 edge)
```
SELECT * FROM cypher('xyz', $$ EXPLAIN ANALYZE VERBOSE MATCH (n:Pers) SET n.age=25 $$) AS (x agtype);
QUERY PLAN
------------------------------------------------------------------------------------------------------
Custom Scan (Cypher Set) (cost=0.00..0.00 rows=0 width=0) (actual time=0.003..0.004 rows=0 loops=1)
Output: cypher.x
-> Result (cost=0.00..0.00 rows=0 width=0) (actual time=0.002..0.002 rows=0 loops=1)
Output: cypher.x
One-Time Filter: false
Planning Time: 0.210 ms
Execution Time: 0.043 ms
(7 rows)
```
```
SELECT * FROM cypher('xyz', $$ EXPLAIN ANALYZE VERBOSE MATCH (n:Pers) DETACH DELETE n $$) AS (x agtype);
QUERY PLAN
---------------------------------------------------------------------------------------------------------
Custom Scan (Cypher Delete) (cost=0.00..0.00 rows=0 width=0) (actual time=0.008..0.010 rows=0 loops=1)
Output: cypher.x
-> Result (cost=0.00..0.00 rows=0 width=0) (actual time=0.005..0.005 rows=0 loops=1)
Output: cypher.x
One-Time Filter: false
Planning Time: 0.303 ms
Execution Time: 8.880 ms
(7 rows)
```
It is unrelated to the fact whether vertices were actually found or not as these queries still fail.
```
SELECT * FROM cypher('xyz', $$ EXPLAIN ANALYZE VERBOSE MATCH (n:Person {name:'x') SET n.name='U' $$) AS (x agtype);
2023-10-15 17:27:51.906 EEST [161353] ERROR: syntax error at or near ")" at character 81
2023-10-15 17:27:51.906 EEST [161353] STATEMENT: SELECT * FROM cypher('xyz', $$ EXPLAIN ANALYZE VERBOSE MATCH (n:Person {name:'x') SET n.name='U' $$) AS (x agtype);
ERROR: syntax error at or near ")"
LINE 1: ... EXPLAIN ANALYZE VERBOSE MATCH (n:Person {name:'x') SET n.na...
```
```
SELECT * FROM cypher('xyz', $$ EXPLAIN ANALYZE VERBOSE MATCH (n:Person {name:'x') DETACH DELETE n $$) AS (x agtype);
2023-10-15 17:28:15.647 EEST [161353] ERROR: syntax error at or near ")" at character 81
2023-10-15 17:28:15.647 EEST [161353] STATEMENT: SELECT * FROM cypher('xyz', $$ EXPLAIN ANALYZE VERBOSE MATCH (n:Person {name:'x') DETACH DELETE n $$) AS (x agtype);
ERROR: syntax error at or near ")"
LINE 1: ... EXPLAIN ANALYZE VERBOSE MATCH (n:Person {name:'x') DETACH D...
```
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] `SET` and `DETACH DELETE` do not work when `VERBOSE` is added to `EXPLAIN ANALYZE` [age]
Posted by "rerz (via GitHub)" <gi...@apache.org>.
rerz commented on issue #1278:
URL: https://github.com/apache/age/issues/1278#issuecomment-2085006449
I ran into a variant of this issue trying to use the rust library [sqlx](https://github.com/launchbadge/sqlx) with Apache AGE. sqlx provides compile time query checking by running queries against an actual database instance. This mostly works just fine since AGE is just Postgres under the hood.
As part of this they use queries like `EXPLAIN (VERBOSE, FORMAT JSON) <your query>`
A query like: `sqlx::query!(r#"SELECT * FROM ag_catalog.create_graph('graph');"#);` works without issues.
However queries that return something from the cypher query fail with the error below:
```
sqlx::query!(r#"SELECT * FROM ag_catalog.cypher('graph', $$
CREATE (v:label) RETURN v
$$) as (v ag_catalog.agtype)"#);
```
```
error: error returned from database: cannot display a value of type internal
--> src/main.rs:49:5
|
49 | / sqlx::query!(r#"SELECT * FROM ag_catalog.cypher('graph', $$
50 | | CREATE (v:label) RETURN v
51 | | $$) as (v ag_catalog.agtype)"#);
| |___________________________________^
|
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query` (in Nightly builds, run with -Z macro-backtrace for more info)
```
--
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: dev-unsubscribe@age.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org