[ https://issues.apache.org/jira/browse/SPARK-47307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kent Yao resolved SPARK-47307. ------------------------------ Fix Version/s: 4.0.0 Assignee: Zhen Wang Resolution: Fixed > Spark 3.3 produces invalid base64 > --------------------------------- > > Key: SPARK-47307 > URL: https://issues.apache.org/jira/browse/SPARK-47307 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.3.0, 4.0.0, 3.5.2, 3.4.4 > Reporter: Willi Raschkowski > Assignee: Zhen Wang > Priority: Blocker > Labels: correctness, pull-request-available > Fix For: 4.0.0 > > > SPARK-37820 was introduced in Spark 3.3 and breaks behavior of {{base64}} > (which is fine but shouldn't happen between minor version). > {code:title=Spark 3.2} > >>> spark.sql(f"""SELECT base64('{'a' * 58}') AS base64""").collect()[0][0] > 'YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ==' > {code} > Note the different output in Spark 3.3 (the addition of {{\r\n}} newlines). > {code:title=Spark 3.3} > >>> spark.sql(f"""SELECT base64('{'a' * 58}') AS base64""").collect()[0][0] > 'YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh\r\nYQ==' > {code} > The former decodes fine with the {{base64}} on my machine but the latter does > not: > {code} > $ pbpaste | base64 --decode > aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa% > $ pbpaste | base64 --decode > base64: stdin: (null): error decoding base64 input stream > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org