prestodb/presto

UnsupportedOperationException: Node planner.plan.DeleteNode does not have a Graphviz visitor

Open

#21 903 ouverte le 12 févr. 2024

Voir sur GitHub
 (3 commentaires) (0 réactions) (1 assigné)Java (5 240 forks)batch import
buggood first issue

Métriques du dépôt

Stars
 (15 558 stars)
Métriques de merge PR
 (Merge moyen 34j 14h) (120 PRs mergées en 30 j)

Description

Description

While performing DELETE operation, the result of the DELETE event fails to print in the console. It happens because the GraphViz printer implementation in Presto doesn't implement the default method of visitDelete with DeleteNode type.

Similar bug is also present in Node planner.plan.MetadataDeleteNode as well, given under the following issue. https://github.com/prestodb/presto/issues/20954

2024-01-16T11:51:58.771+0530	WARN	dispatcher-query-30	com.facebook.presto.event.QueryMonitor	Error creating graphviz plan for query 20240116_062137_00010_v52e2: java.lang.UnsupportedOperationException: Node com.facebook.presto.sql.planner.plan.DeleteNode does not have a Graphviz visitor
java.lang.UnsupportedOperationException: Node com.facebook.presto.sql.planner.plan.DeleteNode does not have a Graphviz visitor
	at com.facebook.presto.util.GraphvizPrinter$NodePrinter.visitPlan(GraphvizPrinter.java:268)
	at com.facebook.presto.util.GraphvizPrinter$NodePrinter.visitPlan(GraphvizPrinter.java:246)
	at com.facebook.presto.sql.planner.plan.InternalPlanVisitor.visitDelete(InternalPlanVisitor.java:97)
	at com.facebook.presto.sql.planner.plan.DeleteNode.accept(DeleteNode.java:94)
	at com.facebook.presto.sql.planner.plan.InternalPlanNode.accept(InternalPlanNode.java:36)
	at com.facebook.presto.util.GraphvizPrinter.printFragmentNodes(GraphvizPrinter.java:240)
	at com.facebook.presto.util.GraphvizPrinter.printDistributedFromFragments(GraphvizPrinter.java:203)
	at com.facebook.presto.sql.planner.planPrinter.PlanPrinter.graphvizDistributedPlan(PlanPrinter.java:451)
	at com.facebook.presto.event.QueryMonitor.createGraphvizQueryPlan(QueryMonitor.java:448)
	at com.facebook.presto.event.QueryMonitor.createQueryMetadata(QueryMonitor.java:287)
	at com.facebook.presto.event.QueryMonitor.queryCompletedEvent(QueryMonitor.java:244)
	at com.facebook.presto.execution.SqlQueryManager.lambda$createQuery$5(SqlQueryManager.java:294)
	at com.facebook.presto.execution.QueryStateMachine.lambda$addQueryInfoStateChangeListener$18(QueryStateMachine.java:971)
	at com.facebook.presto.execution.StateMachine.fireStateChangedListener(StateMachine.java:229)
	at com.facebook.presto.execution.StateMachine.lambda$fireStateChanged$0(StateMachine.java:221)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:839)

To Reproduce

It was identified during development of MongoDB DELETE operation functionality.

Expected behavior

No error in the console after DELETE operation is completed.

Guide contributeur