[ https://issues.apache.org/jira/browse/SPARK-29103?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16934368#comment-16934368 ]
pralabhkumar commented on SPARK-29103: -------------------------------------- [~joseph.torres] In method findNestedField of class StructType.scala , one can make fieldNames.headOption.map(_.toLowerCase(Locale.ROOT) or In class checkAnalysis.scala , Under case alter: AlterTable if one can make fieldName to lowercase before passing to table.schema.findNestedField(fieldName, includeCollections = true) Let me know if this approach is fine , I can create the PR for the same > CheckAnalysis for data source V2 ALTER TABLE ignores case sensitivity > --------------------------------------------------------------------- > > Key: SPARK-29103 > URL: https://issues.apache.org/jira/browse/SPARK-29103 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.0.0 > Reporter: Jose Torres > Priority: Blocker > > For each column referenced, we run > ```val field = table.schema.findNestedField(fieldName, includeCollections = > true)``` > and fail analysis if the field isn't there. This check is always > case-sensitive on column names, even if the underlying catalog is case > insensitive, so it will sometimes throw on ALTER operations which the catalog > supports. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org