weimingdiit opened a new issue, #2128:
URL: https://github.com/apache/auron/issues/2128

   **Description**
   Implement Spark-compatible dayofweek() function
   
   Auron already supports several Spark-compatible date/time extraction 
functions such as year(), month(), dayofmonth(), quarter(), hour(), minute(), 
and second().
   However, Spark also provides a companion function dayofweek() that returns 
the day of the week using Spark’s semantics:
   
   Sunday = 1, Monday = 2, ..., Saturday = 7
   
   To improve compatibility with Spark SQL, we should implement dayofweek() 
natively with the following characteristics:
   
   **Expected behavior**
   
   Function name: dayofweek(expr)
   Return type: INT
   Semantics: Sunday = 1, Monday = 2, ..., Saturday = 7
   Example:
   
   dayofweek('2009-07-30') → 5
   
   Supports: DATE, TIMESTAMP, and compatible string/date inputs consistent with 
existing date extraction functions
   
   Null-safe: should return NULL if input is NULL
   Array and scalar inputs: consistent with current date extraction function 
implementations
   
   **Motivation**
   Ensure feature parity with Apache Spark SQL
   Improve compatibility for expressions and queries migrated from Spark
   Reduce fallback occurrences to Spark expression/UDF wrapper


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

Reply via email to