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

NPE when run on bigquery-emulator #435

Open
turb opened this issue Jan 9, 2025 · 1 comment
Open

NPE when run on bigquery-emulator #435

turb opened this issue Jan 9, 2025 · 1 comment

Comments

@turb
Copy link
Contributor

turb commented Jan 9, 2025

I open this bug for reference.

When trying to write test on synchronousQuery using bigquery-emulator:

Cannot invoke "com.google.cloud.bigquery.TableId.getProject()" because "tempTable" is null
java.lang.NullPointerException: Cannot invoke "com.google.cloud.bigquery.TableId.getProject()" because "tempTable" is null
	at no.nrk.bigquery.client.google.GoogleBigQueryClient.openServerStreams$1(GoogleBigQueryClient.scala:107)
	at no.nrk.bigquery.client.google.GoogleBigQueryClient.$anonfun$synchronousQueryExecute$12(GoogleBigQueryClient.scala:151)
	at fs2.Stream$.$anonfun$resourceWeak$3(Stream.scala:4047)
	at fs2.Stream.$anonfun$flatMap$1(Stream.scala:1275)
	at fs2.Pull$FlatMapR$1.unconsed(Pull.scala:1042)
	at fs2.Pull$FlatMapR$1.out(Pull.scala:1078)
	at fs2.Pull$.$anonfun$compile$24(Pull.scala:1236)
	at fs2.Pull$.$anonfun$compile$2(Pull.scala:952)
	at get @ fs2.internal.Scope.openScope(Scope.scala:275)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Pull$.$anonfun$compile$21(Pull.scala:1214)
	at update @ fs2.internal.Scope.releaseChildScope(Scope.scala:224)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at modify @ fs2.internal.Scope.close(Scope.scala:262)
	at flatMap @ fs2.Compiler$Target.flatMap(Compiler.scala:163)
	at flatMap @ fs2.Pull$.$anonfun$compile$18(Pull.scala:1213)
	at handleErrorWith @ fs2.Compiler$Target.handleErrorWith(Compiler.scala:161)
	at flatMap @ fs2.Pull$.goCloseScope$1(Pull.scala:1199)
	at get @ fs2.internal.Scope.openScope(Scope.scala:275)

This seems to be caused by goccy/bigquery-emulator#180

@turb
Copy link
Contributor Author

turb commented Jan 9, 2025

When using com.dimafeng.testcontainers-scala, the (still unmerged) fix is currently available doing:

DockerImageName.parse("ghcr.io/kromiii/bigquery-emulator:0.4.8") 
   .asCompatibleSubstituteFor("ghcr.io/goccy/bigquery-emulator:0.4.3")

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

No branches or pull requests

1 participant