This repository was archived by the owner on Apr 7, 2026. It is now read-only.
Batch read connection api native adjustments#2569
Merged
olavloite merged 5 commits intobatch-read-connection-apifrom Aug 4, 2023
Merged
Batch read connection api native adjustments#2569olavloite merged 5 commits intobatch-read-connection-apifrom
olavloite merged 5 commits intobatch-read-connection-apifrom
Conversation
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()); |
Member
There was a problem hiding this comment.
Would AbstractStatementParser.class.getName() work when static initialization of failing?
Member
Author
There was a problem hiding this comment.
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 [email protected]/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 [email protected]/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 [email protected]/jdk.internal.reflect.ReflectionFactory.newInstance(ReflectionFactory.java:347)
at [email protected]/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 [email protected]/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 [email protected]/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 [email protected]/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 [email protected]/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 [email protected]/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 [email protected]/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 <[email protected]>
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.