ericm-db commented on PR #49751: URL: https://github.com/apache/spark/pull/49751#issuecomment-2631483423
We need to treat them differently because the schemas for these are non-nullable by default. We can either change the schemas for them to be nullable or have this check, what do you think is the best solution? I think this check makes the most sense but am open to change On Mon, Feb 3, 2025, 12:32 AM Anish ***@***.***> wrote: > ***@***.**** commented on this pull request. > ------------------------------ > > In > sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/StatefulProcessorHandleImpl.scala > <https://github.com/apache/spark/pull/49751#discussion_r1938843936>: > > > ): Map[String, StateStoreColFamilySchema] = { > val schemas = columnFamilySchemas.toMap > - if (setNullableFields) { > - schemas.map { case (colFamilyName, stateStoreColFamilySchema) => > - colFamilyName -> stateStoreColFamilySchema.copy( > - valueSchema = stateStoreColFamilySchema.valueSchema.toNullable > - ) > + schemas.map { case (colFamilyName, schema) => > + // assert that each field is nullable if schema evolution is enabled > + schema.valueSchema.fields.foreach { field => > + if (!field.nullable && shouldCheckNullable && !isInternal(colFamilyName)) { > > Why do we need to treat internal col families differently ? > > — > Reply to this email directly, view it on GitHub > <https://github.com/apache/spark/pull/49751#pullrequestreview-2589011983>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/A7RNYRIO5IZH3FCSEBS2GML2N4EPVAVCNFSM6AAAAABWH7JDB2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKOBZGAYTCOJYGM> > . > You are receiving this because you were mentioned.Message ID: > ***@***.***> > -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
