Skip to content

Conversation

@sohardforaname
Copy link
Contributor

@sohardforaname sohardforaname commented Mar 29, 2023

Proposed changes

Issue Number: close #19623

Problem summary

  1. Add date-time functions for fold constant for Nereids.
    This is the list of executable date-time function nereids supports up to now:
  • now()
  • now(int)
  • current_timestamp(),
  • current_timestamp(int),
  • localtime()
  • localtimestamp()
  • curdate()
  • current_date(
  • curtime()
  • current_time()
  • date_{add/sub}(),{years/months/days/hours/minutes/seconds}_{add/sub}()
  • datediff()
  • {date/datev2}()
  • {year/quarter/month/day/hour/minute/second}()
  • dayof{year/month/week}()
  • date_format()
  • date_trunc()
  • from_days()
  • last_day()
  • to_monday()
  • from_unixtime()
  • unix_timestamp()
  • utc_timestamp()
  • to_date()
  • to_days()
  • str_to_date()
  • makedate()
  1. solved problem:
  • enable datev2/datetimev2 default.
  • refactor Nereids foldConstantOnFE and support fold nested expression.
  • separate the executable into multi-files for easily-reading and adding new functions

developing: time-round functions

Checklist(Required)

  • Does it affect the original behavior
  • Has unit tests been added
  • Has document been added or modified
  • Does it need to update dependencies
  • Is this PR support rollback (If NO, please explain WHY)

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

@sohardforaname
Copy link
Contributor Author

run buildall

@sohardforaname sohardforaname marked this pull request as ready for review April 13, 2023 09:03
@hello-stephen
Copy link
Contributor

hello-stephen commented Apr 13, 2023

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 33.42 seconds
stream load tsv: 428 seconds loaded 74807831229 Bytes, about 166 MB/s
stream load json: 21 seconds loaded 2358488459 Bytes, about 107 MB/s
stream load orc: 60 seconds loaded 1101869774 Bytes, about 17 MB/s
stream load parquet: 30 seconds loaded 861443392 Bytes, about 27 MB/s
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230516082715_clickbench_pr_144411.html

@sohardforaname sohardforaname changed the title [WIP, Feature](Nereids)add executable function to support fold constant for functions. [Feature](Nereids)add executable function to support fold constant for functions. Apr 14, 2023
@sohardforaname
Copy link
Contributor Author

run buildall

@sohardforaname
Copy link
Contributor Author

run ckbench

@sohardforaname
Copy link
Contributor Author

run buildall

@morrySnow
Copy link
Contributor

add UT and regression test please

@sohardforaname sohardforaname force-pushed the fe-fld branch 2 times, most recently from f96fc0b to 1ef2be2 Compare April 27, 2023 03:31
@sohardforaname
Copy link
Contributor Author

run buildall

2 similar comments
@sohardforaname
Copy link
Contributor Author

run buildall

@sohardforaname
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@sohardforaname
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

9 similar comments
@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2023

clang-tidy review says "All clean, LGTM! 👍"

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@sohardforaname
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@sohardforaname
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Copy link
Contributor

@Gabriel39 Gabriel39 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label May 17, 2023
@github-actions
Copy link
Contributor

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@morrySnow morrySnow marked this pull request as draft May 17, 2023 11:34
@Gabriel39 Gabriel39 marked this pull request as ready for review May 17, 2023 13:12
@morrySnow morrySnow merged commit 1d05fee into apache:master May 17, 2023
morrySnow pushed a commit that referenced this pull request Mar 17, 2025
… range (#49033)

### What problem does this PR solve?

Related PR: #18209

Problem Summary:

SELECT STR_TO_DATE('2025-04-31', '%Y-%m-%d') AS result; 
would be changed to result 2025-04-30 in smart mode by mistake
LiBinfeng-01 pushed a commit to LiBinfeng-01/doris that referenced this pull request Mar 17, 2025
… range (apache#49033)

Related PR: apache#18209

Problem Summary:

SELECT STR_TO_DATE('2025-04-31', '%Y-%m-%d') AS result;
would be changed to result 2025-04-30 in smart mode by mistake
LiBinfeng-01 pushed a commit to LiBinfeng-01/doris that referenced this pull request Mar 17, 2025
… range (apache#49033)

Related PR: apache#18209

Problem Summary:

SELECT STR_TO_DATE('2025-04-31', '%Y-%m-%d') AS result;
would be changed to result 2025-04-30 in smart mode by mistake
LiBinfeng-01 pushed a commit to LiBinfeng-01/doris that referenced this pull request Mar 17, 2025
… range (apache#49033)

Related PR: apache#18209

Problem Summary:

SELECT STR_TO_DATE('2025-04-31', '%Y-%m-%d') AS result;
would be changed to result 2025-04-30 in smart mode by mistake
LiBinfeng-01 pushed a commit to LiBinfeng-01/doris that referenced this pull request Mar 17, 2025
… range (apache#49033)

Related PR: apache#18209

Problem Summary:

SELECT STR_TO_DATE('2025-04-31', '%Y-%m-%d') AS result;
would be changed to result 2025-04-30 in smart mode by mistake
LiBinfeng-01 pushed a commit to LiBinfeng-01/doris that referenced this pull request Mar 17, 2025
… range (apache#49033)

Related PR: apache#18209

Problem Summary:

SELECT STR_TO_DATE('2025-04-31', '%Y-%m-%d') AS result;
would be changed to result 2025-04-30 in smart mode by mistake
LiBinfeng-01 pushed a commit to LiBinfeng-01/doris that referenced this pull request Mar 18, 2025
… range (apache#49033)

Related PR: apache#18209

Problem Summary:

SELECT STR_TO_DATE('2025-04-31', '%Y-%m-%d') AS result;
would be changed to result 2025-04-30 in smart mode by mistake
dataroaring pushed a commit that referenced this pull request Mar 27, 2025
…meter out range #49033 (#49151)

pick: #49033 

Related PR: #18209

Problem Summary:

SELECT STR_TO_DATE('2025-04-31', '%Y-%m-%d') AS result; would be changed
to result 2025-04-30 in smart mode by mistake
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
… range (apache#49033)

### What problem does this PR solve?

Related PR: apache#18209

Problem Summary:

SELECT STR_TO_DATE('2025-04-31', '%Y-%m-%d') AS result; 
would be changed to result 2025-04-30 in smart mode by mistake
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. area/nereids area/planner Issues or PRs related to the query planner kind/docs Categorizes issue or PR as related to documentation. kind/test reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] result of IF is not expected

4 participants