Commit e36e8ab
authored
Add arrow cast (#962)
* feat: add data_type parameter to expr_fn macro for arrow_cast function
* feat: add arrow_cast function to cast expressions to specified data types
* docs: add casting section to user guide with examples for arrow_cast function
* test: add unit test for arrow_cast function to validate casting to Float64 and Int32
* fix: update arrow_cast function to accept Expr type for data_type parameter
* fix: update test_arrow_cast to use literal casting for data types
* fix: update arrow_cast function to accept string type for data_type parameter
* fix: update arrow_cast function to accept Expr type for data_type parameter
* fix: update test_arrow_cast to use literal for data type parameters
* fix: update arrow_cast function to use arg_1 for datatype parameter
* fix: update arrow_cast function to accept string type for data_type parameter
* Revert "fix: update arrow_cast function to accept string type for data_type parameter"
This reverts commit eba0d32.
* fix: update test_arrow_cast to cast literals to string type for arrow_cast function
* Revert "fix: update test_arrow_cast to cast literals to string type for arrow_cast function"
This reverts commit 856ff8c.
* fix: update arrow_cast function to accept string type for data_type parameter
* Revert "fix: update arrow_cast function to accept string type for data_type parameter"
This reverts commit 9e1ced7.
* fix: add utf8_literal function to create UTF8 literal expressions in tests
* Revert "fix: add utf8_literal function to create UTF8 literal expressions in tests"
This reverts commit 11ed674.
* feat: add utf8_literal function to create UTF8 literal expressions
* fix: update test_arrow_cast to use column 'b'
* fix: enhance utf8_literal function to handle non-string values
* Add description for utf8_literal vs literal
* docs: clarify utf8_literal function documentation to explain use case
* docs: add clarification comments for utf8_literal usage in arrow_cast tests
* docs: implement ruff recommendation
* fix ruff errors
* docs: update examples to use utf8_literal in arrow_cast function
* docs: correct typo in comment for utf8_literal usage in test_arrow_cast
* docs: remove redundant comment in test_arrow_cast for clarity
* refactor: rename utf8_literal to string_literal and add alias str_lit
* docs: improve docstring for string_literal function for clarity
* docs: update import statement to include str_lit alias for string_literal1 parent 79c22d6 commit e36e8ab
File tree
6 files changed
+66
-3
lines changed- docs/source/user-guide/common-operations
- python
- datafusion
- tests
- src
6 files changed
+66
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
107 | 118 | | |
108 | 119 | | |
109 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
110 | 123 | | |
111 | 124 | | |
112 | 125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
383 | 399 | | |
384 | 400 | | |
385 | 401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
1109 | 1110 | | |
1110 | 1111 | | |
1111 | 1112 | | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
1112 | 1118 | | |
1113 | 1119 | | |
1114 | 1120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
907 | 907 | | |
908 | 908 | | |
909 | 909 | | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
910 | 926 | | |
911 | 927 | | |
912 | 928 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
400 | 400 | | |
401 | 401 | | |
402 | 402 | | |
403 | | - | |
404 | 403 | | |
405 | 404 | | |
406 | 405 | | |
| |||
575 | 574 | | |
576 | 575 | | |
577 | 576 | | |
| 577 | + | |
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
| |||
867 | 867 | | |
868 | 868 | | |
869 | 869 | | |
| 870 | + | |
870 | 871 | | |
871 | 872 | | |
872 | 873 | | |
| |||
0 commit comments