spark-bigquery-connector
spark-bigquery-connector copied to clipboard
SchemaConverters is breaking after 0.30.0, default config should be provided for the converter
SchemaConverters.toSpark and SchemaConverters.toBigQuerySchema is static before 0.30.0, while PR923 made it not static, which breaks the application from upgrading to the latest connector, can we have a default config for the converter so that it's compatible for the existing application?
@davidrabinowitz any suggestions?
Can you please share a full stack trace?
no stack trace, the compile would fail since the function(SchemaConverters.toSpark, SchemaConverters.toBigQuerySchema ) is static before, while after 0.30.0 it's none static.
Can you share more about your usecase? Why do you need to compile against this class?
@davidrabinowitz we regard SchemaConverters as a util to convert schema between spark and bq in our app.
Looks like configuration
is never used within the class. You could pass null
as a workaround.
I think we could change everything to static since there's no configuration? @davidrabinowitz wdyt?
It is there for an upcoming feature. There may be another way to implement it, so we can restore SchemaConverters.
@kaiseu we can't make the above mentioned functions static as we are using the configuration.
You can use SchemaConverters.from(SchemaConvertersConfiguration.createDefault())
to make a call to those functions.
Please check the allowMapTypeConversion
property if you would want to set it in the SchemaConvertersConfiguration
.