nastra commented on code in PR #12418: URL: https://github.com/apache/iceberg/pull/12418#discussion_r2013471141
########## spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/procedures/CreateChangelogViewProcedure.java: ########## @@ -257,6 +263,23 @@ private Dataset<Row> applyCarryoverRemoveIterator( RowEncoder.apply(schema)); } + /** + * Ensure that column can be referenced using this name. + * Issues may come from field names that contain non-standard characters. + * In Spark, this can be fixed by using + * <a href="https://spark.apache.org/docs/3.5.0/sql-ref-identifier.html#delimited-identifier">backtick quotes</a>. + * @param columnName Column name that potentially can contain non-standard characters. + * @return A name that can be safely used within Spark to reference a column by its name. + */ + private static String delimitedName(String columnName) { + final var delimited = columnName.startsWith("`") && columnName.endsWith("`"); Review Comment: ```suggestion var delimited = columnName.startsWith("`") && columnName.endsWith("`"); ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org