coderfender commented on PR #3056:
URL: 
https://github.com/apache/datafusion-comet/pull/3056#issuecomment-3730257351

   ### Cast Support by Eval Mode
   
   The following tables show cast support levels for each evaluation mode.
   
   **Legend:** C = Compatible, I = Incompatible, U = Unsupported, - = Same 
type, N = Spark does not support the cast
   
   #### LEGACY Mode
   
   <!--BEGIN:CAST_LEGACY_TABLE-->
   <!-- prettier-ignore-start -->
   | | binary | boolean | byte | date | decimal | double | float | integer | 
long | short | string | timestamp |
   |---|---|---|---|---|---|---|---|---|---|---|---|---|
   | binary | - | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | C | N/A 
|
   | boolean | N/A | - | C | N/A | U | C | C | C | C | C | C | U |
   | byte | U | C | - | N/A | C | C | C | C | C | C | C | U |
   | date | N/A | U | U | - | U | U | U | U | U | U | C | U |
   | decimal | N/A | C | C | N/A | - | C | C | C | C | C | C | U |
   | double | N/A | C | C | N/A | I | - | C | C | C | C | C | U |
   | float | N/A | C | C | N/A | I | C | - | C | C | C | C | U |
   | integer | U | C | C | N/A | C | C | C | - | C | C | C | U |
   | long | U | C | C | N/A | C | C | C | C | - | C | C | U |
   | short | U | C | C | N/A | C | C | C | C | C | - | C | U |
   | string | C | C | C | C | I | C | C | C | C | C | - | I |
   | timestamp | N/A | U | U | C | U | U | U | U | C | U | C | - |
   <!-- prettier-ignore-end -->
   
   **Notes:**
   - **decimal -> string**: There can be formatting differences in some case 
due to Spark using scientific notation where Comet does not
   - **double -> decimal**: There can be rounding differences
   - **double -> string**: There can be differences in precision. For example, 
the input "1.4E-45" will produce 1.0E-45 instead of 1.4E-45
   - **float -> decimal**: There can be rounding differences
   - **float -> string**: There can be differences in precision. For example, 
the input "1.4E-45" will produce 1.0E-45 instead of 1.4E-45
   - **string -> date**: Only supports years between 262143 BC and 262142 AD
   - **string -> decimal**: Does not support fullwidth unicode digits (e.g 
\\uFF10)
   or strings containing null bytes (e.g \\u0000)
   - **string -> timestamp**: Not all valid formats are supported
   <!--END:CAST_LEGACY_TABLE-->
   
   #### TRY Mode
   
   <!--BEGIN:CAST_TRY_TABLE-->
   <!-- prettier-ignore-start -->
   | | binary | boolean | byte | date | decimal | double | float | integer | 
long | short | string | timestamp |
   |---|---|---|---|---|---|---|---|---|---|---|---|---|
   | binary | - | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | C | N/A 
|
   | boolean | N/A | - | C | N/A | U | C | C | C | C | C | C | U |
   | byte | U | C | - | N/A | C | C | C | C | C | C | C | U |
   | date | N/A | U | U | - | U | U | U | U | U | U | C | U |
   | decimal | N/A | C | C | N/A | - | C | C | C | C | C | C | U |
   | double | N/A | C | C | N/A | I | - | C | C | C | C | C | U |
   | float | N/A | C | C | N/A | I | C | - | C | C | C | C | U |
   | integer | U | C | C | N/A | C | C | C | - | C | C | C | U |
   | long | U | C | C | N/A | C | C | C | C | - | C | C | U |
   | short | U | C | C | N/A | C | C | C | C | C | - | C | U |
   | string | C | C | C | C | I | C | C | C | C | C | - | I |
   | timestamp | N/A | U | U | C | U | U | U | U | C | U | C | - |
   <!-- prettier-ignore-end -->
   
   **Notes:**
   - **decimal -> string**: There can be formatting differences in some case 
due to Spark using scientific notation where Comet does not
   - **double -> decimal**: There can be rounding differences
   - **double -> string**: There can be differences in precision. For example, 
the input "1.4E-45" will produce 1.0E-45 instead of 1.4E-45
   - **float -> decimal**: There can be rounding differences
   - **float -> string**: There can be differences in precision. For example, 
the input "1.4E-45" will produce 1.0E-45 instead of 1.4E-45
   - **string -> date**: Only supports years between 262143 BC and 262142 AD
   - **string -> decimal**: Does not support fullwidth unicode digits (e.g 
\\uFF10)
   or strings containing null bytes (e.g \\u0000)
   - **string -> timestamp**: Not all valid formats are supported
   <!--END:CAST_TRY_TABLE-->
   
   #### ANSI Mode
   
   <!--BEGIN:CAST_ANSI_TABLE-->
   <!-- prettier-ignore-start -->
   | | binary | boolean | byte | date | decimal | double | float | integer | 
long | short | string | timestamp |
   |---|---|---|---|---|---|---|---|---|---|---|---|---|
   | binary | - | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | C | N/A 
|
   | boolean | N/A | - | C | N/A | U | C | C | C | C | C | C | U |
   | byte | U | C | - | N/A | C | C | C | C | C | C | C | U |
   | date | N/A | U | U | - | U | U | U | U | U | U | C | U |
   | decimal | N/A | C | C | N/A | - | C | C | C | C | C | C | U |
   | double | N/A | C | C | N/A | I | - | C | C | C | C | C | U |
   | float | N/A | C | C | N/A | I | C | - | C | C | C | C | U |
   | integer | U | C | C | N/A | C | C | C | - | C | C | C | U |
   | long | U | C | C | N/A | C | C | C | C | - | C | C | U |
   | short | U | C | C | N/A | C | C | C | C | C | - | C | U |
   | string | C | C | C | C | I | C | C | C | C | C | - | I |
   | timestamp | N/A | U | U | C | U | U | U | U | C | U | C | - |
   <!-- prettier-ignore-end -->
   
   **Notes:**
   - **decimal -> string**: There can be formatting differences in some case 
due to Spark using scientific notation where Comet does not
   - **double -> decimal**: There can be rounding differences
   - **double -> string**: There can be differences in precision. For example, 
the input "1.4E-45" will produce 1.0E-45 instead of 1.4E-45
   - **float -> decimal**: There can be rounding differences
   - **float -> string**: There can be differences in precision. For example, 
the input "1.4E-45" will produce 1.0E-45 instead of 1.4E-45
   - **string -> date**: Only supports years between 262143 BC and 262142 AD
   - **string -> decimal**: Does not support fullwidth unicode digits (e.g 
\\uFF10)
   or strings containing null bytes (e.g \\u0000)
   - **string -> timestamp**: ANSI mode not supported
   <!--END:CAST_ANSI_TABLE-->
   


-- 
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]

Reply via email to