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

Fix the broken Pinot JDBC client. #11606

Merged
merged 1 commit into from
Sep 16, 2023
Merged

Conversation

shenyu0127
Copy link
Contributor

@shenyu0127 shenyu0127 commented Sep 16, 2023

This is to roll back #11510.

Currently the Pinot JDBC client is broken:

2023-09-14 14:24:45.641 -0700 (test-site,,,,6,59) pool-3-thread-1 : ERROR org.apache.pinot.spi.utils.PinotReflectionUtils - Error scanning methods within package: 'org.apache.pinot' with regex pattern: '.*\.function\..*', annotation: ScalarFunction
java.lang.NoClassDefFoundError: org/apache/datasketches/theta/Sketch
        at java.lang.Class.getDeclaredMethods0(Native Method) ~[?:?]
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[?:?]
        at java.lang.Class.getDeclaredMethod(Unknown Source) ~[?:?]
        at org.reflections.util.Utils.getMemberFromDescriptor(Utils.java:88) ~[?:?]
        at org.reflections.util.Utils.getMethodsFromDescriptors(Utils.java:101) ~[?:?]
        at org.reflections.Reflections.getMethodsAnnotatedWith(Reflections.java:482) ~[?:?]
        at org.apache.pinot.spi.utils.PinotReflectionUtils.getMethodsThroughReflection(PinotReflectionUtils.java:97) ~[?:?]
        at org.apache.pinot.spi.utils.PinotReflectionUtils.getMethodsThroughReflection(PinotReflectionUtils.java:88) ~[?:?]
        at org.apache.pinot.common.function.FunctionRegistry.<clinit>(FunctionRegistry.java:62) ~[?:?]
        at org.apache.pinot.sql.parsers.rewriter.CompileTimeFunctionsInvoker.invokeCompileTimeFunctionExpression(CompileTimeFunctionsInvoker.java:74) ~[?:?]
        at org.apache.pinot.sql.parsers.rewriter.CompileTimeFunctionsInvoker.invokeCompileTimeFunctionExpression(CompileTimeFunctionsInvoker.java:66) ~[?:?]
        at org.apache.pinot.sql.parsers.rewriter.CompileTimeFunctionsInvoker.rewrite(CompileTimeFunctionsInvoker.java:47) ~[?:?]
        at org.apache.pinot.sql.parsers.CalciteSqlParser.queryRewrite(CalciteSqlParser.java:549) ~[?:?]
        at org.apache.pinot.sql.parsers.CalciteSqlParser.compileSqlNodeToPinotQuery(CalciteSqlParser.java:486) ~[?:?]
        at org.apache.pinot.client.Connection.resolveTableName(Connection.java:195) ~[?:?]
        at org.apache.pinot.client.Connection.execute(Connection.java:119) ~[?:?]
        at org.apache.pinot.client.Connection.execute(Connection.java:94) ~[?:?]
        at org.apache.pinot.client.PinotStatement.executeQuery(PinotStatement.java:67) ~[?:?]
        at org.apache.pinot.client.PinotStatement.execute(PinotStatement.java:82) ~[?:?]
        at com.tableausoftware.jdbc.JDBCProtocolImpl.runQuery(JDBCProtocolImpl.java:628) ~[jdbcserver.jar:20231.0.6]
        at com.tableausoftware.jdbc.JDBCProtocolImpl.runQuery(JDBCProtocolImpl.java:688) ~[jdbcserver.jar:20231.0.6]
        at com.tableau.connect.service.QueryTask.readData(QueryTask.java:124) ~[jdbcserver.jar:20231.0.6]
        at com.tableau.connect.service.QueryTask.call(QueryTask.java:91) ~[jdbcserver.jar:20231.0.6]
        at com.tableau.connect.service.QueryTask.call(QueryTask.java:41) ~[jdbcserver.jar:20231.0.6]
        at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
        at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.lang.ClassNotFoundException: org.apache.datasketches.theta.Sketch
        at java.net.URLClassLoader.findClass(Unknown Source) ~[?:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?]
        at java.net.FactoryURLClassLoader.loadClass(Unknown Source) ~[?:?]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[?:?]
        ... 28 more

Prefer rollback to rolling forward with fix as per release best practices. We can try the comprehensive solution afterwards.

Tested the Pinot JDBC client built from this PR and got no error.

CC @abhioncbr @xiangfu0

#11507

@codecov-commenter
Copy link

codecov-commenter commented Sep 16, 2023

Codecov Report

Merging #11606 (d187f06) into master (4292356) will increase coverage by 0.27%.
Report is 2 commits behind head on master.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master   #11606      +/-   ##
============================================
+ Coverage     62.92%   63.19%   +0.27%     
- Complexity     1103     1106       +3     
============================================
  Files          2326     2323       -3     
  Lines        124984   124461     -523     
  Branches      19080    18988      -92     
============================================
+ Hits          78641    78656      +15     
+ Misses        40730    40214     -516     
+ Partials       5613     5591      -22     
Flag Coverage Δ
integration <0.01% <ø> (+<0.01%) ⬆️
integration1 <0.01% <ø> (+<0.01%) ⬆️
integration2 0.00% <ø> (ø)
java-11 63.15% <ø> (+48.65%) ⬆️
java-17 63.03% <ø> (+48.54%) ⬆️
java-20 63.06% <ø> (+0.16%) ⬆️
temurin 63.19% <ø> (+0.27%) ⬆️
unittests 63.19% <ø> (+0.27%) ⬆️
unittests1 67.47% <ø> (+0.21%) ⬆️
unittests2 14.51% <ø> (+<0.01%) ⬆️

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

see 54 files with indirect coverage changes

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

@shenyu0127 shenyu0127 marked this pull request as ready for review September 16, 2023 17:34
@xiangfu0 xiangfu0 merged commit 5df3fb4 into apache:master Sep 16, 2023
23 checks passed
@shenyu0127 shenyu0127 deleted the pinot-clients branch September 16, 2023 18:11
@abhioncbr
Copy link
Contributor

Thanks @shenyu0127 , I will start looking the more robust fix as suggested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants