4paradigm / 4paradigm/OpenMLDB

support `format` argument for `date`, `datediff`, `timestamp`, `unix_timestamp`, etc

Open
#2,848 1 comment 0 reactions 2 assignees Claimed by @aceforeverd View on GitHub
execute-engine udf
Dominant language
C++
Stars
1.7k
Forks
331
Avg merge
12d 12h
Merged PRs (30d)
1

Description

**Describe the feature you'd like**

A clear and concise description of what you want to happen.
Currently we only support the following fixed three formats:
- yyyy-mm-dd
- yyyymmdd
- yyyy-mm-dd hh:mm:ss

We may allow user to provide a `format` argument to these functions.

**Additional context**

Add any other context or screenshots about the feature request here.

Contributor guide

Open the contributing guide

Research direction

Look for the date, datediff, timestamp, unix_timestamp function implementations in the codebase, likely in SQL function modules. Understand the current fixed format parsing and output logic. The task is to extend these functions to accept a format argument, requiring changes to function signatures, parsing, and possibly validation. Check existing tests for these functions to see how they are currently tested and add new tests for the format argument.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, sql
Domain
backend, databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.