Skip to content

DRILL-6450: Visualized plans for profiles querying JDBC sources is broken#1295

Closed
kkhatua wants to merge 1 commit intoapache:masterfrom
kkhatua:DRILL-6450
Closed

DRILL-6450: Visualized plans for profiles querying JDBC sources is broken#1295
kkhatua wants to merge 1 commit intoapache:masterfrom
kkhatua:DRILL-6450

Conversation

@kkhatua
Copy link
Contributor

@kkhatua kkhatua commented May 29, 2018

When viewing a profile for a query against a JDBC source, the visualized plan is not rendered. This is because the generated SQL pushed down to the JDBC source has a line break injected just before the FROM clause.

The workaround is to strip away any injected newlines ('\n') at least for the SQL defined in the text plan, so that the backend Javascript can render it correctly.
In addition, any single line comments are also removed, but any block comments (i.e. /* .. */ ) are retained as they might carry hints.

@kkhatua
Copy link
Contributor Author

kkhatua commented May 29, 2018

Before:
image

After:
image

image

@kkhatua
Copy link
Contributor Author

kkhatua commented May 29, 2018

@amansinha100 can you do a review for this small PR?

…oken

When viewing a profile for a query against a JDBC source, the visualized plan is not rendered. This is because the generated SQL pushed down to the JDBC source has a line break injected just before the FROM clause.

The workaround is to strip away any injected newlines ('\\n') at least for the SQL defined in the text plan, so that the backend Javascript can render it correctly.
In addition, any single line comments are also removed, but any block comments (i.e. /* .. */ ) are retained as they might carry hints.
Copy link

@amansinha100 amansinha100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have much test coverage for the jdbc plugin but since this PR at least fixes the basic rendering of the visual plan, I am +1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants