Skip to content

Conversation

@BiteTheDDDDt
Copy link
Contributor

Proposed changes

Issue Number: close #8871

Problem Summary:

Describe the overview of changes.

Checklist(Required)

  1. Does it affect the original behavior: (Yes/No/I Don't know)
  2. Has unit tests been added: (Yes/No/No Need)
  3. Has document been added or modified: (Yes/No/No Need)
  4. Does it need to update dependencies: (Yes/No)
  5. Are there any changes that cannot be rolled back: (Yes/No)

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...

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

Please add test case.

@dataroaring dataroaring added the kind/need-regression-test Need to add regression test for this case label Apr 6, 2022
@BiteTheDDDDt
Copy link
Contributor Author

Please add test case.

This fix have float result , we should wait for #8730, and #8730 depends on some code at #8770 , I think we should submit the tests separately after.

@EmmyMiao87
Copy link
Contributor

It doesn't seem to solve the problem completely, there is still a wrong case ~

@wangbo
Copy link
Contributor

wangbo commented Apr 7, 2022

    case OLAP_FIELD_TYPE_DATETIME: {
        auto column_int = assert_cast<vectorized::ColumnVector<vectorized::Int64>*>(column);

        for (uint32_t j = 0; j < selected_size; ++j) {
            if (!nullable_mark_array[j]) {
                uint32_t row_idx = j + start;
                auto ptr = reinterpret_cast<const char*>(batch->cell_ptr(row_idx));

                uint64_t value = *reinterpret_cast<const uint64_t*>(ptr);
                vectorized::VecDateTimeValue data(value);
                (column_int)->insert_data(reinterpret_cast<char*>(&data), 0);
            } else {
                column_int->insert_default();
            }
        }
        break;
    }

It seems that the code in row_block2.cpp should also be fixed.

update fix
@BiteTheDDDDt
Copy link
Contributor Author

Please add test case.

I will submit a separate pr after this pr merged.

_year(0) {} // before int128 16 bytes ---> after int64 8 bytes

explicit VecDateTimeValue(int64_t t) { from_date_int64(t); }
static VecDateTimeValue create_from_olap_date(uint64_t value) {
Copy link
Contributor

Choose a reason for hiding this comment

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

add comment what's the different between create_from_olap_datetime and create_from_normal_datetime. it is default to know the different from the name of function name.

@github-actions github-actions bot added area/sql/function Issues or PRs related to the SQL functions area/vectorization labels Apr 11, 2022
Copy link
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

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

LGTM

@HappenLee HappenLee added the dev/1.0.1-deprecated should be merged into dev-1.0.1 branch label Apr 18, 2022
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Apr 18, 2022
@github-actions
Copy link
Contributor

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

@morningman morningman merged commit 681f960 into apache:master Apr 18, 2022
@morningman morningman added dev/merged-1.0.1-deprecated PR has been merged into dev-1.0.1 and removed dev/1.0.1-deprecated should be merged into dev-1.0.1 branch labels Apr 18, 2022
weizhengte pushed a commit to weizhengte/incubator-doris that referenced this pull request Apr 22, 2022
zhengshiJ pushed a commit to zhengshiJ/incubator-doris that referenced this pull request Apr 27, 2022
starocean999 pushed a commit to starocean999/incubator-doris that referenced this pull request May 19, 2022
englefly pushed a commit to englefly/incubator-doris that referenced this pull request May 23, 2022
@BiteTheDDDDt BiteTheDDDDt deleted the fix_0406_2 branch January 20, 2025 06:48
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/sql/function Issues or PRs related to the SQL functions area/vectorization dev/merged-1.0.1-deprecated PR has been merged into dev-1.0.1 kind/need-regression-test Need to add regression test for this case

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [Storage-Vectorized] query get wrong result when read datetime type column

6 participants