arrow icon indicating copy to clipboard operation
arrow copied to clipboard

GH-44054: [C++] Implement PostgreSQL dedicated date extracting functions

Open mdianjun opened this issue 1 year ago • 2 comments

Rationale for this change

Described in https://github.com/apache/arrow/issues/44054.

What changes are included in this PR?

Implement three functions to extract PG's DATA/TIMESTAMP data type. They use a common class named year_month_day_pg which is similar to the existing class year_month_day, except adding days alignment with epoch '2000-01-01'.

Are these changes tested?

New test case has been added.

Are there any user-facing changes?

Yes. Add new functions in temporal component extraction for processing PG's DATA/TIMESTAMP data type, the function names are pg_year, pg_month, pg_day, pg_week corresponding to year, month, day, week respectively.

mdianjun avatar Sep 11 '24 02:09 mdianjun

Thanks for opening a pull request!

If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose

Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project.

Then could you also rename the pull request title in the following format?

GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

or

MINOR: [${COMPONENT}] ${SUMMARY}

In the case of PARQUET issues on JIRA the title also supports:

PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}

See also:

github-actions[bot] avatar Sep 11 '24 02:09 github-actions[bot]

@ZhangHuiGui would you mind take a look?

mapleFU avatar Sep 11 '24 02:09 mapleFU

Could you fix CI failures? You can check CI results on your fork too: https://github.com/marsno1/arrow/actions

kou avatar Oct 24 '24 01:10 kou