Skip to content
2 changes: 1 addition & 1 deletion docs/spark_expressions_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
- [ ] timestamp_micros
- [ ] timestamp_millis
- [ ] timestamp_seconds
- [ ] to_date
- [x] to_date
- [ ] to_timestamp
- [ ] to_timestamp_ltz
- [ ] to_timestamp_ntz
Expand Down
4 changes: 4 additions & 0 deletions native/spark-expr/src/comet_scalar_funcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// specific language governing permissions and limitations
// under the License.

use crate::datetime_funcs::to_timestamp;
use crate::hash_funcs::*;
use crate::math_funcs::abs::abs;
use crate::math_funcs::checked_arithmetic::{checked_add, checked_div, checked_mul, checked_sub};
Expand Down Expand Up @@ -173,6 +174,9 @@ pub fn create_comet_physical_fun_with_eval_mode(
let func = Arc::new(spark_modulo);
make_comet_scalar_udf!("spark_modulo", func, without data_type, fail_on_error)
}
"to_timestamp" => {
make_comet_scalar_udf!("to_timestamp", to_timestamp, without data_type, fail_on_error)
}
"abs" => {
let func = Arc::new(abs);
make_comet_scalar_udf!("abs", func, without data_type)
Expand Down
2 changes: 2 additions & 0 deletions native/spark-expr/src/datetime_funcs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ mod date_trunc;
mod extract_date_part;
mod make_date;
mod timestamp_trunc;
mod to_timestamp;
mod unix_timestamp;

pub use date_diff::SparkDateDiff;
Expand All @@ -29,4 +30,5 @@ pub use extract_date_part::SparkMinute;
pub use extract_date_part::SparkSecond;
pub use make_date::SparkMakeDate;
pub use timestamp_trunc::TimestampTruncExpr;
pub use to_timestamp::to_timestamp;
pub use unix_timestamp::SparkUnixTimestamp;
Loading
Loading