Skip to content

Commit 643c1ba

Browse files
committed
docs: update compatibility and config tables
1 parent 86a2841 commit 643c1ba

2 files changed

Lines changed: 378 additions & 0 deletions

File tree

docs/source/user-guide/latest/compatibility.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,16 +111,97 @@ Cast operations in Comet fall into three levels of support:
111111
### Legacy Mode
112112

113113
<!--BEGIN:CAST_LEGACY_TABLE-->
114+
<!-- prettier-ignore-start -->
115+
| | binary | boolean | byte | date | decimal | double | float | integer | long | short | string | timestamp |
116+
|---|---|---|---|---|---|---|---|---|---|---|---|---|
117+
| binary | - | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | C | N/A |
118+
| boolean | N/A | - | C | N/A | U | C | C | C | C | C | C | U |
119+
| byte | U | C | - | N/A | C | C | C | C | C | C | C | U |
120+
| date | N/A | U | U | - | U | U | U | U | U | U | C | U |
121+
| decimal | N/A | C | C | N/A | - | C | C | C | C | C | C | U |
122+
| double | N/A | C | C | N/A | I | - | C | C | C | C | C | U |
123+
| float | N/A | C | C | N/A | I | C | - | C | C | C | C | U |
124+
| integer | U | C | C | N/A | C | C | C | - | C | C | C | U |
125+
| long | U | C | C | N/A | C | C | C | C | - | C | C | U |
126+
| short | U | C | C | N/A | C | C | C | C | C | - | C | U |
127+
| string | C | C | C | C | I | C | C | C | C | C | - | I |
128+
| timestamp | N/A | U | U | C | U | U | U | U | C | U | C | - |
129+
130+
**Notes:**
131+
- **decimal -> string**: There can be formatting differences in some case due to Spark using scientific notation where Comet does not
132+
- **double -> decimal**: There can be rounding differences
133+
- **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
134+
- **float -> decimal**: There can be rounding differences
135+
- **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
136+
- **string -> date**: Only supports years between 262143 BC and 262142 AD
137+
- **string -> decimal**: Does not support fullwidth unicode digits (e.g \\uFF10)
138+
or strings containing null bytes (e.g \\u0000)
139+
- **string -> timestamp**: Not all valid formats are supported
140+
<!-- prettier-ignore-end -->
114141
<!--END:CAST_LEGACY_TABLE-->
115142

116143
### Try Mode
117144

118145
<!--BEGIN:CAST_TRY_TABLE-->
146+
<!-- prettier-ignore-start -->
147+
| | binary | boolean | byte | date | decimal | double | float | integer | long | short | string | timestamp |
148+
|---|---|---|---|---|---|---|---|---|---|---|---|---|
149+
| binary | - | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | C | N/A |
150+
| boolean | N/A | - | C | N/A | U | C | C | C | C | C | C | U |
151+
| byte | U | C | - | N/A | C | C | C | C | C | C | C | U |
152+
| date | N/A | U | U | - | U | U | U | U | U | U | C | U |
153+
| decimal | N/A | C | C | N/A | - | C | C | C | C | C | C | U |
154+
| double | N/A | C | C | N/A | I | - | C | C | C | C | C | U |
155+
| float | N/A | C | C | N/A | I | C | - | C | C | C | C | U |
156+
| integer | U | C | C | N/A | C | C | C | - | C | C | C | U |
157+
| long | U | C | C | N/A | C | C | C | C | - | C | C | U |
158+
| short | U | C | C | N/A | C | C | C | C | C | - | C | U |
159+
| string | C | C | C | C | I | C | C | C | C | C | - | I |
160+
| timestamp | N/A | U | U | C | U | U | U | U | C | U | C | - |
161+
162+
**Notes:**
163+
- **decimal -> string**: There can be formatting differences in some case due to Spark using scientific notation where Comet does not
164+
- **double -> decimal**: There can be rounding differences
165+
- **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
166+
- **float -> decimal**: There can be rounding differences
167+
- **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
168+
- **string -> date**: Only supports years between 262143 BC and 262142 AD
169+
- **string -> decimal**: Does not support fullwidth unicode digits (e.g \\uFF10)
170+
or strings containing null bytes (e.g \\u0000)
171+
- **string -> timestamp**: Not all valid formats are supported
172+
<!-- prettier-ignore-end -->
119173
<!--END:CAST_TRY_TABLE-->
120174

121175
### ANSI Mode
122176

123177
<!--BEGIN:CAST_ANSI_TABLE-->
178+
<!-- prettier-ignore-start -->
179+
| | binary | boolean | byte | date | decimal | double | float | integer | long | short | string | timestamp |
180+
|---|---|---|---|---|---|---|---|---|---|---|---|---|
181+
| binary | - | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | C | N/A |
182+
| boolean | N/A | - | C | N/A | U | C | C | C | C | C | C | U |
183+
| byte | U | C | - | N/A | C | C | C | C | C | C | C | U |
184+
| date | N/A | U | U | - | U | U | U | U | U | U | C | U |
185+
| decimal | N/A | C | C | N/A | - | C | C | C | C | C | C | U |
186+
| double | N/A | C | C | N/A | I | - | C | C | C | C | C | U |
187+
| float | N/A | C | C | N/A | I | C | - | C | C | C | C | U |
188+
| integer | U | C | C | N/A | C | C | C | - | C | C | C | U |
189+
| long | U | C | C | N/A | C | C | C | C | - | C | C | U |
190+
| short | U | C | C | N/A | C | C | C | C | C | - | C | U |
191+
| string | C | C | C | C | I | C | C | C | C | C | - | I |
192+
| timestamp | N/A | U | U | C | U | U | U | U | C | U | C | - |
193+
194+
**Notes:**
195+
- **decimal -> string**: There can be formatting differences in some case due to Spark using scientific notation where Comet does not
196+
- **double -> decimal**: There can be rounding differences
197+
- **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
198+
- **float -> decimal**: There can be rounding differences
199+
- **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
200+
- **string -> date**: Only supports years between 262143 BC and 262142 AD
201+
- **string -> decimal**: Does not support fullwidth unicode digits (e.g \\uFF10)
202+
or strings containing null bytes (e.g \\u0000)
203+
- **string -> timestamp**: ANSI mode not supported
204+
<!-- prettier-ignore-end -->
124205
<!--END:CAST_ANSI_TABLE-->
125206

126207
See the [tracking issue](https://github.com/apache/datafusion-comet/issues/286) for more details.

0 commit comments

Comments
 (0)