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

Better handling of null tableNames #12654

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

soumitra-st
Copy link
Contributor

Robust handling of null tableName to resolve below stack trace when the caller invoked this method as:

String tableName = null;
brokerSelector.selectBroker(tableName);
Caused by: java.lang.NullPointerException: Cannot invoke "String.replace(java.lang.CharSequence, java.lang.CharSequence)" because "tableName" is null
 ┊at org.apache.pinot.client.utils.BrokerSelectorUtils.getTableNameWithoutSuffix(BrokerSelectorUtils.java:69)
 ┊at org.apache.pinot.client.utils.BrokerSelectorUtils.getTablesCommonBrokers(BrokerSelectorUtils.java:42)
 ┊at org.apache.pinot.client.DynamicBrokerSelector.selectBroker(DynamicBrokerSelector.java:94)

@codecov-commenter
Copy link

codecov-commenter commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 61.88%. Comparing base (59551e4) to head (f4e09dd).
Report is 130 commits behind head on master.

Files Patch % Lines
...org/apache/pinot/client/DynamicBrokerSelector.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #12654      +/-   ##
============================================
+ Coverage     61.75%   61.88%   +0.13%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2452      +16     
  Lines        133233   133840     +607     
  Branches      20636    20766     +130     
============================================
+ Hits          82274    82824     +550     
+ Misses        44911    44888      -23     
- Partials       6048     6128      +80     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration <0.01% <0.00%> (-0.01%) ⬇️
integration1 <0.01% <0.00%> (-0.01%) ⬇️
integration2 0.00% <0.00%> (ø)
java-11 61.82% <0.00%> (+0.11%) ⬆️
java-21 61.76% <0.00%> (+0.13%) ⬆️
skip-bytebuffers-false 61.86% <0.00%> (+0.11%) ⬆️
skip-bytebuffers-true 61.72% <0.00%> (+33.99%) ⬆️
temurin 61.88% <0.00%> (+0.13%) ⬆️
unittests 61.87% <0.00%> (+0.13%) ⬆️
unittests1 46.91% <ø> (+0.02%) ⬆️
unittests2 27.77% <0.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Jackie-Jiang Jackie-Jiang merged commit d7cfc99 into apache:master Mar 14, 2024
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants