apache / apache/pinot

Specify dateTime field as human readable string

Open
#7,000 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.1k
Forks
1.5k
Avg merge
2d 3h
Merged PRs (30d)
195

Description

Hello,

Following a discussion on [this thread](https://apache-pinot.slack.com/archives/C011C9JHN7R/p1622466597303800) I would like to propose an enhancement wherein a pinot operator can define a dateTimeField in a schema and have its result being shown to the Pinot user at query time as a human readable string while at the same time being able to use date time transformations as mentioned [here](https://docs.pinot.apache.org/users/user-guide-query/supported-transformations#datetime-functions).

As an example:
I.e: Showing to the user a date time field in the format: yyyy-MM-dd on which they can do `year(field)` or `month(field)` transformations
Where a query like: `select year(dateBirth), dateBirth from table where...`
outputs: `1982 | 1982-02-13`

Thank you.

Contributor guide

Open the contributing guide

Research direction

No source file, test, or entry point is named. Start by tracing schema dateTimeField handling and the query date-time transformation documentation linked in the issue; done means a configured field is displayed as a human-readable string while year(field) and month(field) transformations continue to work as shown in the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.