Files
doris/regression-test/data
yujun 78c9f737d3 branch-2.1: [fix](nereids) fix cast literal to date like throw exception (#48780)
### What problem does this PR solve?

when nereids cast invalid date literal to date like type, it will throws
exceptions:

```
select '' = cast('2020-10-20' as date);
(1105, 'errCode = 2, detailMessage = date/datetime literal [] is invalid')
```

But old planner will not throw exceptions, so let neredis don't throw
exceptions too.

This PR is pick code from: #40202

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [x] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

- Behavior changed:
    - [ ] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
2025-03-11 12:10:38 +08:00
..