- Notifications
You must be signed in to change notification settings - Fork 135
Batch read connection api native adjustments #2569
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
Merged
olavloite merged 5 commits into batch-read-connection-api from batch-read-connection-api-native-adjustments Aug 4, 2023
Merged
Batch read connection api native adjustments #2569
olavloite merged 5 commits into batch-read-connection-api from batch-read-connection-api-native-adjustments Aug 4, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
olavloite approved these changes Aug 4, 2023
suztomo reviewed Aug 4, 2023
getInstance(Dialect.GOOGLE_STANDARD_SQL).parse(Statement.of("RUN BATCH")); | ||
| ||
} catch (Throwable ex) { | ||
Logger logger = Logger.getLogger(AbstractStatementParser.class.getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would AbstractStatementParser.class.getName()
work when static initialization of failing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. An example of this being invoked when debugging the native configuration:
Aug 04, 2023 6:24:30 PM com.google.cloud.spanner.connection.AbstractStatementParser <clinit> SEVERE: Static initialization failure. com.google.cloud.spanner.connection.ClientSideStatementImpl$CompileException: Could not compile statement PARTITION <sql> at com.google.cloud.spanner.connection.ClientSideStatementImpl.compile(ClientSideStatementImpl.java:159) at com.google.cloud.spanner.connection.ClientSideStatements.getCompiledStatements(ClientSideStatements.java:76) at com.google.cloud.spanner.connection.SpannerStatementParser.<init>(SpannerStatementParser.java:41) at java.base@17.0.7/java.lang.reflect.Constructor.newInstanceWithCaller([Constructor.java:499](https://cs.corp.google.com/#search/&sq=package:%5Epiper$%20project:openjdk&q=java/lang/reflect/Constructor.java:499)) at java.base@17.0.7/java.lang.reflect.ReflectAccess.newInstance([ReflectAccess.java:128](https://cs.corp.google.com/#search/&sq=package:%5Epiper$%20project:openjdk&q=java/lang/reflect/ReflectAccess.java:128)) at java.base@17.0.7/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347) at java.base@17.0.7/java.lang.Class.newInstance([DynamicHub.java:645](https://cs.corp.google.com/#search/&sq=package:%5Epiper$%20project:openjdk&q=java/lang/DynamicHub.java:645)) at com.google.cloud.spanner.connection.AbstractStatementParser.getInstance(AbstractStatementParser.java:77) at com.google.cloud.spanner.connection.AbstractStatementParser.<clinit>(AbstractStatementParser.java:97) at com.google.cloud.spanner.connection.ConnectionImpl.getStatementParser(ConnectionImpl.java:320) at com.google.cloud.spanner.connection.ConnectionImpl.parseAndExecuteQuery(ConnectionImpl.java:1145) at com.google.cloud.spanner.connection.ConnectionImpl.executeQuery(ConnectionImpl.java:1016) at com.google.cloud.spanner.connection.it.ITBulkConnectionTest.lambda$testBulkCreateConnectionsMultiThreaded$0(ITBulkConnectionTest.java:74) at java.base@17.0.7/java.util.concurrent.FutureTask.run([FutureTask.java:264](https://cs.corp.google.com/#search/&sq=package:%5Epiper$%20project:openjdk&q=java/util/concurrent/FutureTask.java:264)) at java.base@17.0.7/java.util.concurrent.ThreadPoolExecutor.runWorker([ThreadPoolExecutor.java:1136](https://cs.corp.google.com/#search/&sq=package:%5Epiper$%20project:openjdk&q=java/util/concurrent/ThreadPoolExecutor.java:1136)) at java.base@17.0.7/java.util.concurrent.ThreadPoolExecutor$Worker.run([ThreadPoolExecutor.java:635](https://cs.corp.google.com/#search/&sq=package:%5Epiper$%20project:openjdk&q=java/util/concurrent/ThreadPoolExecutor.java:635)) at java.base@17.0.7/java.lang.Thread.run([Thread.java:833](https://cs.corp.google.com/#search/&sq=package:%5Epiper$%20project:openjdk&q=java/lang/Thread.java:833)) at org.graalvm.nativeimage.builder/com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine([PlatformThreads.java:775](https://cs.corp.google.com/#search/&q=f:com/oracle/svm/core/thread/PlatformThreads.java:775)) at org.graalvm.nativeimage.builder/com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine([PosixPlatformThreads.java:203](https://cs.corp.google.com/#search/&q=f:com/oracle/svm/core/posix/thread/PosixPlatformThreads.java:203)) Caused by: java.lang.ClassNotFoundException: com.google.cloud.spanner.connection.ClientSideStatementPartitionExecutor at java.base@17.0.7/java.lang.Class.forName([DynamicHub.java:1132](https://cs.corp.google.com/#search/&sq=package:%5Epiper$%20project:openjdk&q=java/lang/DynamicHub.java:1132)) at java.base@17.0.7/java.lang.Class.forName([DynamicHub.java:1105](https://cs.corp.google.com/#search/&sq=package:%5Epiper$%20project:openjdk&q=java/lang/DynamicHub.java:1105)) at com.google.cloud.spanner.connection.ClientSideStatementImpl.compile(ClientSideStatementImpl.java:154) ... 18 more
olavloite added a commit that referenced this pull request Aug 4, 2023
* feat: support partitioned queries + data boost in Connection API Adds support for Partitioned Queries and Data Boost in the Connection API. This enables the use of these features in the JDBC driver and PGAdapter. * fix: match the correct group in regex * feat: add more SQL statements for partitioned queries * chore: refactor client side statements to accept the entire parsed statement Refactor the internal interface of client-side statements so these receive the entire parsed statement, including any query parameters in the statement. This allows us to create client-side statements that actually use the query parameters that have been specified by the user. * chore: simplify test * chore: cleanup differences * chore: cleanup unrelated changes * fix: update converter name * test: add more tests * chore: add missing license header * fix: handle empty partitioned queries correctly * fix: do not use any random staleness for partitioned queries * fix: only return false for next() if all have finished * chore: rename to autoPartitionMode * chore: rename sql statements + add tests for empty results * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: address review comments * Batch read connection api native adjustments (#2569) * chore: add ClientSideStatementPartitionExecutor to SpannerFeature * chore: wrap AbstractStatementParser static initialization in try/catch * chore: add ClientSideStatementRunPartitionExecutor to SpannerFeature * chore: add ClientSideStatementRunPartitionedQueryExecutor to SpannerFeature * chore: lint formatting --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Burke Davison <40617934+burkedavison@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
No description provided.