You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2022/12/02 15:41:40 UTC
[GitHub] [pinot] walterddr opened a new pull request, #9902: [hotfix] broker selection not using table name
walterddr opened a new pull request, #9902:
URL: https://github.com/apache/pinot/pull/9902
this fixes: #9695.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #9902: [hotfix] broker selection not using table name
Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on code in PR #9902:
URL: https://github.com/apache/pinot/pull/9902#discussion_r1038441723
##########
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/Connection.java:
##########
@@ -165,7 +163,33 @@ public Future<ResultSetGroup> executeAsync(String query)
@Deprecated
public Future<ResultSetGroup> executeAsync(Request request)
throws PinotClientException {
- return executeAsync(request.getQuery());
+ return executeAsync(null, request.getQuery());
+ }
+
+ /**
+ * Executes a query asynchronously.
+ *
+ * @param query The query to execute
+ * @return A future containing the result of the query
+ * @throws PinotClientException If an exception occurs while processing the query
+ */
+ public Future<ResultSetGroup> executeAsync(String tableName, String query)
+ throws PinotClientException {
+ tableName = tableName == null ? resolveTableName(query) : tableName;
+ String brokerHostPort = _brokerSelector.selectBroker(tableName);
+ if (brokerHostPort == null) {
+ throw new PinotClientException("Could not find broker to query for statement: " + query);
+ }
+ return new ResultSetGroupFuture(_transport.executeQueryAsync(brokerHostPort, query));
+ }
+
+ private static String resolveTableName(String query) {
Review Comment:
```suggestion
@Nullable
private static String resolveTableName(String query) {
```
##########
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/Connection.java:
##########
@@ -165,7 +163,33 @@ public Future<ResultSetGroup> executeAsync(String query)
@Deprecated
public Future<ResultSetGroup> executeAsync(Request request)
throws PinotClientException {
- return executeAsync(request.getQuery());
+ return executeAsync(null, request.getQuery());
+ }
+
+ /**
+ * Executes a query asynchronously.
+ *
+ * @param query The query to execute
+ * @return A future containing the result of the query
+ * @throws PinotClientException If an exception occurs while processing the query
+ */
+ public Future<ResultSetGroup> executeAsync(String tableName, String query)
Review Comment:
```suggestion
public Future<ResultSetGroup> executeAsync(@Nullable String tableName, String query)
```
##########
pinot-clients/pinot-java-client/src/main/java/org/apache/pinot/client/Connection.java:
##########
@@ -165,7 +163,33 @@ public Future<ResultSetGroup> executeAsync(String query)
@Deprecated
public Future<ResultSetGroup> executeAsync(Request request)
throws PinotClientException {
- return executeAsync(request.getQuery());
+ return executeAsync(null, request.getQuery());
+ }
+
+ /**
+ * Executes a query asynchronously.
+ *
+ * @param query The query to execute
+ * @return A future containing the result of the query
+ * @throws PinotClientException If an exception occurs while processing the query
+ */
+ public Future<ResultSetGroup> executeAsync(String tableName, String query)
+ throws PinotClientException {
+ tableName = tableName == null ? resolveTableName(query) : tableName;
+ String brokerHostPort = _brokerSelector.selectBroker(tableName);
+ if (brokerHostPort == null) {
+ throw new PinotClientException("Could not find broker to query for statement: " + query);
+ }
+ return new ResultSetGroupFuture(_transport.executeQueryAsync(brokerHostPort, query));
+ }
+
+ private static String resolveTableName(String query) {
+ try {
+ return CalciteSqlCompiler.compileToBrokerRequest(query).querySource.tableName;
+ } catch (Exception e) {
+ LOGGER.error("Cannot parse table name from query: " + query, e);
Review Comment:
```suggestion
LOGGER.error("Cannot parse table name from query: {}", query, e);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] walterddr merged pull request #9902: [hotfix] broker selection not using table name
Posted by GitBox <gi...@apache.org>.
walterddr merged PR #9902:
URL: https://github.com/apache/pinot/pull/9902
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [pinot] codecov-commenter commented on pull request #9902: [hotfix] broker selection not using table name
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #9902:
URL: https://github.com/apache/pinot/pull/9902#issuecomment-1335747379
# [Codecov](https://codecov.io/gh/apache/pinot/pull/9902?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#9902](https://codecov.io/gh/apache/pinot/pull/9902?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e5c6b92) into [master](https://codecov.io/gh/apache/pinot/commit/041865a80f7a2359270571a2343049bb1f294fe5?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (041865a) will **decrease** coverage by `52.83%`.
> The diff coverage is `58.33%`.
```diff
@@ Coverage Diff @@
## master #9902 +/- ##
=============================================
- Coverage 68.65% 15.81% -52.84%
+ Complexity 5049 175 -4874
=============================================
Files 1973 1928 -45
Lines 106008 103874 -2134
Branches 16060 15823 -237
=============================================
- Hits 72775 16430 -56345
- Misses 28110 86238 +58128
+ Partials 5123 1206 -3917
```
| Flag | Coverage Δ | |
|---|---|---|
| integration1 | `?` | |
| unittests1 | `?` | |
| unittests2 | `15.81% <58.33%> (-0.02%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/pinot/pull/9902?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [.../main/java/org/apache/pinot/client/Connection.java](https://codecov.io/gh/apache/pinot/pull/9902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY2xpZW50cy9waW5vdC1qYXZhLWNsaWVudC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY2xpZW50L0Nvbm5lY3Rpb24uamF2YQ==) | `59.61% <58.33%> (+17.39%)` | :arrow_up: |
| [...src/main/java/org/apache/pinot/sql/FilterKind.java](https://codecov.io/gh/apache/pinot/pull/9902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcWwvRmlsdGVyS2luZC5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...ain/java/org/apache/pinot/spi/utils/LoopUtils.java](https://codecov.io/gh/apache/pinot/pull/9902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvdXRpbHMvTG9vcFV0aWxzLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...ain/java/org/apache/pinot/core/data/table/Key.java](https://codecov.io/gh/apache/pinot/pull/9902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL3RhYmxlL0tleS5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...in/java/org/apache/pinot/spi/utils/BytesUtils.java](https://codecov.io/gh/apache/pinot/pull/9902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvdXRpbHMvQnl0ZXNVdGlscy5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...n/java/org/apache/pinot/core/data/table/Table.java](https://codecov.io/gh/apache/pinot/pull/9902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL3RhYmxlL1RhYmxlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../java/org/apache/pinot/core/data/table/Record.java](https://codecov.io/gh/apache/pinot/pull/9902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9kYXRhL3RhYmxlL1JlY29yZC5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../java/org/apache/pinot/core/util/GroupByUtils.java](https://codecov.io/gh/apache/pinot/pull/9902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS91dGlsL0dyb3VwQnlVdGlscy5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...java/org/apache/pinot/spi/trace/BaseRecording.java](https://codecov.io/gh/apache/pinot/pull/9902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvdHJhY2UvQmFzZVJlY29yZGluZy5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...java/org/apache/pinot/spi/trace/NoOpRecording.java](https://codecov.io/gh/apache/pinot/pull/9902/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvdHJhY2UvTm9PcFJlY29yZGluZy5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [1451 more](https://codecov.io/gh/apache/pinot/pull/9902/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org