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 2021/02/10 10:54:13 UTC
[GitHub] [incubator-pinot] KKcorps opened a new pull request #6570: implement execute method of prepared statement class in JDBC
KKcorps opened a new pull request #6570:
URL: https://github.com/apache/incubator-pinot/pull/6570
This PR addresses issue #6557 .
----------------------------------------------------------------
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.
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] [incubator-pinot] fx19880617 commented on a change in pull request #6570: Implement execute method of prepared statement class in JDBC
Posted by GitBox <gi...@apache.org>.
fx19880617 commented on a change in pull request #6570:
URL: https://github.com/apache/incubator-pinot/pull/6570#discussion_r574220383
##########
File path: pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotPreparedStatement.java
##########
@@ -154,6 +154,37 @@ public void clearParameters()
_preparedStatement = new PreparedStatement(_session, new Request(QUERY_FORMAT, _query));
}
+ @Override
+ public boolean execute()
+ throws SQLException {
+ _resultSet = executeQuery();
+ if (_resultSet.next()) {
+ _resultSet.beforeFirst();
+ return true;
+ } else {
+ _resultSet = null;
+ return false;
+ }
+ }
+
+ @Override
+ public ResultSet executeQuery(String sql)
+ throws SQLException {
+ validateState();
+ try {
+ Request request = new Request(QUERY_FORMAT, sql);
+ _resultSetGroup = _session.execute(request);
+ if (_resultSetGroup.getResultSetCount() == 0) {
+ _resultSet = PinotResultSet.empty();
+ return _resultSet;
+ }
+ _resultSet = new PinotResultSet(_resultSetGroup.getResultSet(0));
Review comment:
do we need to set `_resultSet` instead of directly return?
----------------------------------------------------------------
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.
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] [incubator-pinot] fx19880617 commented on a change in pull request #6570: Implement execute method of prepared statement class in JDBC
Posted by GitBox <gi...@apache.org>.
fx19880617 commented on a change in pull request #6570:
URL: https://github.com/apache/incubator-pinot/pull/6570#discussion_r574219867
##########
File path: pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotPreparedStatement.java
##########
@@ -154,6 +154,37 @@ public void clearParameters()
_preparedStatement = new PreparedStatement(_session, new Request(QUERY_FORMAT, _query));
}
+ @Override
+ public boolean execute()
+ throws SQLException {
+ _resultSet = executeQuery();
+ if (_resultSet.next()) {
+ _resultSet.beforeFirst();
+ return true;
+ } else {
+ _resultSet = null;
+ return false;
+ }
+ }
+
+ @Override
+ public ResultSet executeQuery(String sql)
+ throws SQLException {
+ validateState();
+ try {
+ Request request = new Request(QUERY_FORMAT, sql);
+ _resultSetGroup = _session.execute(request);
+ if (_resultSetGroup.getResultSetCount() == 0) {
+ _resultSet = PinotResultSet.empty();
+ return _resultSet;
+ }
+ _resultSet = new PinotResultSet(_resultSetGroup.getResultSet(0));
+ return _resultSet;
Review comment:
return new PinotResultSet(_resultSetGroup.getResultSet(0));
----------------------------------------------------------------
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.
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] [incubator-pinot] KKcorps commented on pull request #6570: implement execute method of prepared statement class in JDBC
Posted by GitBox <gi...@apache.org>.
KKcorps commented on pull request #6570:
URL: https://github.com/apache/incubator-pinot/pull/6570#issuecomment-776624798
@fx19880617
----------------------------------------------------------------
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.
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] [incubator-pinot] fx19880617 commented on a change in pull request #6570: Implement execute method of prepared statement class in JDBC
Posted by GitBox <gi...@apache.org>.
fx19880617 commented on a change in pull request #6570:
URL: https://github.com/apache/incubator-pinot/pull/6570#discussion_r574219789
##########
File path: pinot-clients/pinot-jdbc-client/src/main/java/org/apache/pinot/client/PinotPreparedStatement.java
##########
@@ -154,6 +154,37 @@ public void clearParameters()
_preparedStatement = new PreparedStatement(_session, new Request(QUERY_FORMAT, _query));
}
+ @Override
+ public boolean execute()
+ throws SQLException {
+ _resultSet = executeQuery();
+ if (_resultSet.next()) {
+ _resultSet.beforeFirst();
+ return true;
+ } else {
+ _resultSet = null;
+ return false;
+ }
+ }
+
+ @Override
+ public ResultSet executeQuery(String sql)
+ throws SQLException {
+ validateState();
+ try {
+ Request request = new Request(QUERY_FORMAT, sql);
+ _resultSetGroup = _session.execute(request);
+ if (_resultSetGroup.getResultSetCount() == 0) {
+ _resultSet = PinotResultSet.empty();
Review comment:
return PinotResultSet.empty();
----------------------------------------------------------------
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.
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] [incubator-pinot] codecov-io commented on pull request #6570: implement execute method of prepared statement class in JDBC
Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #6570:
URL: https://github.com/apache/incubator-pinot/pull/6570#issuecomment-776657251
# [Codecov](https://codecov.io/gh/apache/incubator-pinot/pull/6570?src=pr&el=h1) Report
> Merging [#6570](https://codecov.io/gh/apache/incubator-pinot/pull/6570?src=pr&el=desc) (445c8f1) into [master](https://codecov.io/gh/apache/incubator-pinot/commit/1beaab59b73f26c4e35f3b9bc856b03806cddf5a?el=desc) (1beaab5) will **decrease** coverage by `22.60%`.
> The diff coverage is `40.66%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-pinot/pull/6570/graphs/tree.svg?width=650&height=150&src=pr&token=4ibza2ugkz)](https://codecov.io/gh/apache/incubator-pinot/pull/6570?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #6570 +/- ##
===========================================
- Coverage 66.44% 43.83% -22.61%
===========================================
Files 1075 1342 +267
Lines 54773 65975 +11202
Branches 8168 9618 +1450
===========================================
- Hits 36396 28923 -7473
- Misses 15700 34620 +18920
+ Partials 2677 2432 -245
```
| Flag | Coverage Δ | |
|---|---|---|
| integration | `43.83% <40.66%> (?)` | |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-pinot/pull/6570?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [...ot/broker/broker/AllowAllAccessControlFactory.java](https://codecov.io/gh/apache/incubator-pinot/pull/6570/diff?src=pr&el=tree#diff-cGlub3QtYnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9icm9rZXIvYnJva2VyL0FsbG93QWxsQWNjZXNzQ29udHJvbEZhY3RvcnkuamF2YQ==) | `100.00% <ø> (ø)` | |
| [...t/broker/broker/BasicAuthAccessControlFactory.java](https://codecov.io/gh/apache/incubator-pinot/pull/6570/diff?src=pr&el=tree#diff-cGlub3QtYnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9icm9rZXIvYnJva2VyL0Jhc2ljQXV0aEFjY2Vzc0NvbnRyb2xGYWN0b3J5LmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../helix/BrokerUserDefinedMessageHandlerFactory.java](https://codecov.io/gh/apache/incubator-pinot/pull/6570/diff?src=pr&el=tree#diff-cGlub3QtYnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9icm9rZXIvYnJva2VyL2hlbGl4L0Jyb2tlclVzZXJEZWZpbmVkTWVzc2FnZUhhbmRsZXJGYWN0b3J5LmphdmE=) | `52.83% <0.00%> (-13.84%)` | :arrow_down: |
| [...org/apache/pinot/broker/queryquota/HitCounter.java](https://codecov.io/gh/apache/incubator-pinot/pull/6570/diff?src=pr&el=tree#diff-cGlub3QtYnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9icm9rZXIvcXVlcnlxdW90YS9IaXRDb3VudGVyLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...che/pinot/broker/queryquota/MaxHitRateTracker.java](https://codecov.io/gh/apache/incubator-pinot/pull/6570/diff?src=pr&el=tree#diff-cGlub3QtYnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9icm9rZXIvcXVlcnlxdW90YS9NYXhIaXRSYXRlVHJhY2tlci5qYXZh) | `0.00% <0.00%> (ø)` | |
| [...ache/pinot/broker/queryquota/QueryQuotaEntity.java](https://codecov.io/gh/apache/incubator-pinot/pull/6570/diff?src=pr&el=tree#diff-cGlub3QtYnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9icm9rZXIvcXVlcnlxdW90YS9RdWVyeVF1b3RhRW50aXR5LmphdmE=) | `0.00% <0.00%> (-50.00%)` | :arrow_down: |
| [...ker/routing/instanceselector/InstanceSelector.java](https://codecov.io/gh/apache/incubator-pinot/pull/6570/diff?src=pr&el=tree#diff-cGlub3QtYnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9icm9rZXIvcm91dGluZy9pbnN0YW5jZXNlbGVjdG9yL0luc3RhbmNlU2VsZWN0b3IuamF2YQ==) | `100.00% <ø> (ø)` | |
| [...ceselector/StrictReplicaGroupInstanceSelector.java](https://codecov.io/gh/apache/incubator-pinot/pull/6570/diff?src=pr&el=tree#diff-cGlub3QtYnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9icm9rZXIvcm91dGluZy9pbnN0YW5jZXNlbGVjdG9yL1N0cmljdFJlcGxpY2FHcm91cEluc3RhbmNlU2VsZWN0b3IuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...roker/routing/segmentpruner/TimeSegmentPruner.java](https://codecov.io/gh/apache/incubator-pinot/pull/6570/diff?src=pr&el=tree#diff-cGlub3QtYnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9icm9rZXIvcm91dGluZy9zZWdtZW50cHJ1bmVyL1RpbWVTZWdtZW50UHJ1bmVyLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [...roker/routing/segmentpruner/interval/Interval.java](https://codecov.io/gh/apache/incubator-pinot/pull/6570/diff?src=pr&el=tree#diff-cGlub3QtYnJva2VyL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9icm9rZXIvcm91dGluZy9zZWdtZW50cHJ1bmVyL2ludGVydmFsL0ludGVydmFsLmphdmE=) | `0.00% <0.00%> (ø)` | |
| ... and [1352 more](https://codecov.io/gh/apache/incubator-pinot/pull/6570/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-pinot/pull/6570?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-pinot/pull/6570?src=pr&el=footer). Last update [a6196ba...445c8f1](https://codecov.io/gh/apache/incubator-pinot/pull/6570?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
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] [incubator-pinot] fx19880617 merged pull request #6570: Implement execute method of prepared statement class in JDBC
Posted by GitBox <gi...@apache.org>.
fx19880617 merged pull request #6570:
URL: https://github.com/apache/incubator-pinot/pull/6570
----------------------------------------------------------------
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.
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