Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug log statements for pinot PQL #22221

Closed
wants to merge 1 commit into from

Conversation

naman-patel
Copy link

@naman-patel naman-patel commented May 31, 2024

Description

To do a better debuging of Pinot performance issues we are trying to log the queries. There is no way we can do that. I do feel there should be a general approach for enabling this across but for now we desperately need this.

Additional context and related issues

The PR allows a connector setting to log the queries executed against a pinot catalog. This helps better query tracking.

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

@cla-bot cla-bot bot added the cla-signed label May 31, 2024
@github-actions github-actions bot added the docs label May 31, 2024
@naman-patel naman-patel requested a review from ebyhr May 31, 2024 19:51
@naman-patel naman-patel changed the title Add pinot config to log the queries [WIP]Add pinot config to log the queries May 31, 2024
@naman-patel naman-patel force-pushed the log-queries branch 2 times, most recently from 635c6a7 to bc031a9 Compare May 31, 2024 20:48
@naman-patel naman-patel changed the title [WIP]Add pinot config to log the queries Add pinot config to log the queries May 31, 2024
@naman-patel
Copy link
Author

@ebyhr done. Changed all to debug.

@naman-patel naman-patel force-pushed the log-queries branch 2 times, most recently from e1741c8 to aabcd63 Compare June 3, 2024 17:51
@ebyhr
Copy link
Member

ebyhr commented Jun 3, 2024

Please update PR title.

@@ -75,7 +78,7 @@ public ConnectorPageSource createPageSource(
}
PinotTableHandle pinotTableHandle = (PinotTableHandle) tableHandle;
String query = generatePql(pinotTableHandle, handles, pinotSplit.getSuffix(), pinotSplit.getTimePredicate(), limitForSegmentQueries);

LOG.debug("Pinot query: %s", query);
Copy link
Member

@ebyhr ebyhr Jun 3, 2024

Choose a reason for hiding this comment

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

The logging place looks still wrong. Note that #22253 is going to move the above generatePql method call because it's redundant in case of dynamic tables.

Copy link
Author

Choose a reason for hiding this comment

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

In that case let me close the PR.

@ebyhr
Copy link
Member

ebyhr commented Jun 3, 2024

Log queries

Please use a more helpful commit title. e.g. "Add debug log for generated Pinot SQL"

@naman-patel naman-patel changed the title Add pinot config to log the queries Add debug log statements for pinot PQL Jun 4, 2024
@naman-patel naman-patel closed this Jun 4, 2024
@naman-patel naman-patel deleted the log-queries branch June 4, 2024 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants