pinot icon indicating copy to clipboard operation
pinot copied to clipboard

parsing query to get tablename

Open tanmesh opened this issue 3 years ago • 7 comments

Description:

This PR extract tableName from the query when the tableName is null.

This PR will solve the following issue -- #8842

Testing:

Added the ConnectionTest.java to ensure that the tableName is parsed correctly.

tanmesh avatar Aug 21 '22 23:08 tanmesh

Codecov Report

Merging #9263 (61df979) into master (7197461) will increase coverage by 29.98%. The diff coverage is n/a.

@@              Coverage Diff              @@
##             master    #9263       +/-   ##
=============================================
+ Coverage     37.14%   67.13%   +29.98%     
- Complexity      193     4817     +4624     
=============================================
  Files          1838     1381      -457     
  Lines         97516    71991    -25525     
  Branches      14711    11524     -3187     
=============================================
+ Hits          36222    48329    +12107     
+ Misses        58360    20157    -38203     
- Partials       2934     3505      +571     
Flag Coverage Δ
integration1 ?
integration2 ?
unittests1 67.13% <ø> (?)
unittests2 ?

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

Impacted Files Coverage Δ
...va/org/apache/pinot/core/routing/RoutingTable.java 0.00% <0.00%> (-100.00%) :arrow_down:
...va/org/apache/pinot/common/config/NettyConfig.java 0.00% <0.00%> (-100.00%) :arrow_down:
...a/org/apache/pinot/common/metrics/MinionMeter.java 0.00% <0.00%> (-100.00%) :arrow_down:
...g/apache/pinot/common/metrics/ControllerMeter.java 0.00% <0.00%> (-100.00%) :arrow_down:
.../apache/pinot/common/metrics/BrokerQueryPhase.java 0.00% <0.00%> (-100.00%) :arrow_down:
.../apache/pinot/common/metrics/MinionQueryPhase.java 0.00% <0.00%> (-100.00%) :arrow_down:
...ache/pinot/server/access/AccessControlFactory.java 0.00% <0.00%> (-100.00%) :arrow_down:
...a/org/apache/pinot/query/parser/QueryRewriter.java 0.00% <0.00%> (-100.00%) :arrow_down:
...he/pinot/common/messages/SegmentReloadMessage.java 0.00% <0.00%> (-100.00%) :arrow_down:
...he/pinot/common/messages/TableDeletionMessage.java 0.00% <0.00%> (-100.00%) :arrow_down:
... and 1598 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov-commenter avatar Aug 23 '22 22:08 codecov-commenter

@Jackie-Jiang May I get some help with this? I am unable to understand why these two Unit Test Sets are failing?

tanmesh avatar Aug 26 '22 21:08 tanmesh

Here are the failed tests, not sure if they are related:

2022-08-23T22:43:39.6255697Z [ERROR] Failures: 
2022-08-23T22:43:39.6286446Z [ERROR]   ResultSetGroupTest.testDeserializeAggregationGroupByResultSet:89->getResultSet:133 » PinotClient
2022-08-23T22:43:39.6287809Z [ERROR]   ResultSetGroupTest.testDeserializeAggregationResultSet:67->getResultSet:133 » PinotClient
2022-08-23T22:43:39.6288737Z [ERROR]   ResultSetGroupTest.testDeserializeExceptionResultSetSkipFail:126 Execute should have thrown an exception
2022-08-23T22:43:39.6290158Z [ERROR]   ResultSetGroupTest.testDeserializeSelectionResultSet:40->getResultSet:133 » PinotClient

I'll rerun the tests anyway

Jackie-Jiang avatar Aug 27 '22 00:08 Jackie-Jiang

I have addressed the failures in the latest commit. @Jackie-Jiang can you plz review and re-run the CI test ?

tanmesh avatar Sep 15 '22 17:09 tanmesh

Putting the error message for reference.

Error: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (default-testCompile) on project pinot-jdbc-client: Compilation failure Error: /home/runner/work/pinot/pinot/pinot-clients/pinot-jdbc-client/src/test/java/org/apache/pinot/client/PinotPreparedStatementTest.java:[41,73] error: constructor DummyPinotControllerTransport in class DummyPinotControllerTransport cannot be applied to given types; Error: required: Map<String,String>,String,SSLContext Error: found: no arguments Error: reason: actual and formal argument lists differ in length

It's giving compilation error on CI test, though it is successful on local testing.

tanmesh avatar Sep 15 '22 22:09 tanmesh

@Jackie-Jiang Can you please re-run the CI? because the pinot-jdbc-client (which is failing in CI ) is successful in local testing.

tanmesh avatar Sep 26 '22 06:09 tanmesh

@Jackie-Jiang Can you please re-run the CI? because the pinot-jdbc-client (which is failing in CI ) is successful in local testing.

Seems re-run doesn't pass

xiangfu0 avatar Sep 26 '22 09:09 xiangfu0

#9902 of the same purpose was merged

Jackie-Jiang avatar Oct 13 '23 19:10 Jackie-Jiang