This is an automated email from the ASF dual-hosted git repository.

andygrove pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git


The following commit(s) were added to refs/heads/main by this push:
     new 3209b988f2 feat: verify local_timestamp (#4331)
3209b988f2 is described below

commit 3209b988f249010f4cb9e83a4a59b2c2f07d6046
Author: Bolin Lin <[email protected]>
AuthorDate: Sun May 17 09:50:53 2026 -0400

    feat: verify local_timestamp (#4331)
---
 .../contributor-guide/spark_expressions_support.md |  2 +-
 docs/source/user-guide/latest/expressions.md       |  1 +
 .../expressions/datetime/local_timestamp.sql       | 34 ++++++++++++++++++++++
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/docs/source/contributor-guide/spark_expressions_support.md 
b/docs/source/contributor-guide/spark_expressions_support.md
index 07e6ac96e9..6e0e35aad0 100644
--- a/docs/source/contributor-guide/spark_expressions_support.md
+++ b/docs/source/contributor-guide/spark_expressions_support.md
@@ -241,7 +241,7 @@
 - [ ] from_utc_timestamp
 - [x] hour
 - [x] last_day
-- [ ] localtimestamp
+- [x] localtimestamp
 - [x] make_date
 - [ ] make_dt_interval
 - [ ] make_interval
diff --git a/docs/source/user-guide/latest/expressions.md 
b/docs/source/user-guide/latest/expressions.md
index 096162331f..9bfec5b722 100644
--- a/docs/source/user-guide/latest/expressions.md
+++ b/docs/source/user-guide/latest/expressions.md
@@ -113,6 +113,7 @@ of expressions that be disabled.
 | FromUnixTime     | `from_unixtime`              |
 | Hour             | `hour`                       |
 | LastDay          | `last_day`                   |
+| LocalTimestamp   | `localtimestamp`             |
 | MakeDate         | `make_date`                  |
 | Minute           | `minute`                     |
 | NextDay          | `next_day`                   |
diff --git 
a/spark/src/test/resources/sql-tests/expressions/datetime/local_timestamp.sql 
b/spark/src/test/resources/sql-tests/expressions/datetime/local_timestamp.sql
new file mode 100644
index 0000000000..c8ee42a5e8
--- /dev/null
+++ 
b/spark/src/test/resources/sql-tests/expressions/datetime/local_timestamp.sql
@@ -0,0 +1,34 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License.  You may obtain a copy of the License at
+--
+--   http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied.  See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+
+statement
+CREATE TABLE test_local_timestamp(id int) USING parquet
+
+statement
+INSERT INTO test_local_timestamp VALUES (1), (2), (3), (4), (NULL)
+
+query
+SELECT localtimestamp() IS NOT NULL
+
+query
+SELECT id, localtimestamp() IS NOT NULL FROM test_local_timestamp
+
+query
+SELECT id FROM test_local_timestamp WHERE localtimestamp() = localtimestamp()
+
+query
+SELECT year(localtimestamp()) = year(current_date())


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to