[
https://issues.apache.org/jira/browse/DRILL-5782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16626554#comment-16626554
]
ASF GitHub Bot commented on DRILL-5782:
---------------------------------------
ilooner closed pull request #1476: DRILL-5782: Web UI: do not attempt to build
visualized plan when plan…
URL: https://github.com/apache/drill/pull/1476
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/exec/java-exec/src/main/resources/rest/static/js/graph.js
b/exec/java-exec/src/main/resources/rest/static/js/graph.js
index 9ea117cc1c5..5801245c660 100644
--- a/exec/java-exec/src/main/resources/rest/static/js/graph.js
+++ b/exec/java-exec/src/main/resources/rest/static/js/graph.js
@@ -19,10 +19,12 @@ $(window).on('load',(function () {
return $.map(table, function (record, index) {
var ra = [];
var nested = faccess(record);
- for (var i = 0; i < nested.length; i++) {
- var newrec = $.extend({}, record);
- newrec[dest] = nested[i];
- ra.push(newrec);
+ if (nested !== undefined) {
+ for (var i = 0; i < nested.length; i++) {
+ var newrec = $.extend({}, record);
+ newrec[dest] = nested[i];
+ ra.push(newrec);
+ }
}
return ra;
});
@@ -350,9 +352,10 @@ $(window).on('load',(function () {
function setupglobalconfig (profile) {
globalconfig.profile = profile;
- globalconfig.majorcolorscale = d3.scale.category20()
- .domain([0, d3.max(profile.fragmentProfile,
accessor("majorFragmentId"))]);
-
+ if (profile.fragmentProfile !== undefined) {
+ globalconfig.majorcolorscale = d3.scale.category20()
+ .domain([0, d3.max(profile.fragmentProfile,
accessor("majorFragmentId"))]);
+ }
}
String.prototype.endsWith = function(suffix) {
@@ -368,7 +371,7 @@ $(window).on('load',(function () {
// trigger svg drawing when visible
$('#query-tabs').on('shown.bs.tab', function (e) {
- if (queryvisualdrawn || !e.target.href.endsWith("#query-visual"))
return;
+ if (profile.plan === undefined || queryvisualdrawn ||
!e.target.href.endsWith("#query-visual")) return;
buildplangraph(d3.select("#query-visual-canvas"), profile.plan);
queryvisualdrawn = true;
})
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Web UI: do not attempt to build visualized plan when plan is absent
> -------------------------------------------------------------------
>
> Key: DRILL-5782
> URL: https://issues.apache.org/jira/browse/DRILL-5782
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.11.0
> Reporter: Arina Ielchiieva
> Assignee: Anton Gozhiy
> Priority: Major
> Labels: ready-to-commit
> Fix For: 1.15.0
>
> Attachments: error_when_creating_visualized_plan.JPG
>
>
> When trying to execute query with incorrect syntax, there is an error on
> query profile page (screenshot attached). Error occurs when we try to build
> visualized plan when plan is absent.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)