You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: regressions in CometToPrettyStringSuite (#2384)
* Introduce BinaryOutputStyle from Spark 4.0
* Allow casting from binary to string
* Pass binaryOutputStyle to query plan serde
* Take binaryOutputStyle in planner
* Implement Spark-style ToPrettyString
* Match file name w/ test name
* Test all 5 BinaryOutputStyle in Spark 4.0
* Fix package: 'org.apache.sql' -> 'org.apache.spark.sql'
* Add CometToPrettyStringSuite back to CI
* Specify binaryOutputStyle for Spark 3.4
* Let Comet deal with non pretty string casting
* Enable binary to string casting test
* Attempt to fix the build; ToPrettyString is Spark 3.5+
* Removed resolved issues
* Type casting only function
* Extract test setup logic to CometFuzzTestBase
* Move binary_output_style proto <-> enum mapping to core
* Move BinaryOutputStyle from cast.rs to lib.rs
* Remove incorrect comments
Copy file name to clipboardExpand all lines: docs/source/user-guide/latest/compatibility.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -210,6 +210,7 @@ The following cast operations are generally compatible with Spark except for the
210
210
| string | long ||
211
211
| string | binary ||
212
212
| string | date | Only supports years between 262143 BC and 262142 AD |
213
+
| binary | string ||
213
214
| date | string ||
214
215
| timestamp | long ||
215
216
| timestamp | string ||
@@ -233,7 +234,6 @@ The following cast operations are not compatible with Spark for all inputs and a
233
234
| string | double | Does not support inputs ending with 'd' or 'f'. Does not support 'inf'. Does not support ANSI mode. |
234
235
| string | decimal | Does not support inputs ending with 'd' or 'f'. Does not support 'inf'. Does not support ANSI mode. Returns 0.0 instead of null if input contains no digits |
235
236
| string | timestamp | Not all valid formats are supported |
236
-
| binary | string | Only works for binary data representing valid UTF-8 strings |
/// This function mimics the [BinaryFormatter]: https://github.com/apache/spark/blob/v4.0.0/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ToStringBase.scala#L449-L468
1080
+
/// used by SparkSQL's ToPrettyString expression.
1081
+
/// The BinaryFormatter was [introduced]: https://issues.apache.org/jira/browse/SPARK-47911 in Spark 4.0.0
1082
+
/// Before Spark 4.0.0, the default is SPACE_DELIMITED_UPPERCASE_HEX
0 commit comments