Merge pull request #36283 from ClickHouse/play-fix-error

Fix Play UI for some resultsets
This commit is contained in:
Alexey Milovidov 2022-04-15 18:11:40 +03:00 committed by GitHub
commit f7e6f9e564
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -589,7 +589,7 @@
stats.innerText = `Elapsed: ${seconds} sec, read ${formatted_rows} rows, ${formatted_bytes}.`; stats.innerText = `Elapsed: ${seconds} sec, read ${formatted_rows} rows, ${formatted_bytes}.`;
/// We can also render graphs if user performed EXPLAIN PIPELINE graph=1 or EXPLAIN AST graph = 1 /// We can also render graphs if user performed EXPLAIN PIPELINE graph=1 or EXPLAIN AST graph = 1
if (response.data.length > 3 && response.data[0][0].startsWith("digraph") && document.getElementById('query').value.match(/^\s*EXPLAIN/i)) { if (response.data.length > 3 && document.getElementById('query').value.match(/^\s*EXPLAIN/i) && typeof(response.data[0][0]) === "string" && response.data[0][0].startsWith("digraph")) {
renderGraph(response); renderGraph(response);
} else { } else {
renderTable(response); renderTable(response);