Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Fix the incorrect aggregation result due to the sequence number #3101

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Aitozi
Copy link
Contributor

@Aitozi Aitozi commented Mar 27, 2024

Purpose

Linked issue: close #3020

This pr is meant to fix the incorrect aggregation result for first, first_not_null, last_not_null

Tests

API and Format

Documentation

sql(
"INSERT INTO AGG VALUES (1, '1', cast(null as varchar), cast(null as varchar), 4, 4, 4)");
assertThat(sql("SELECT * FROM AGG"))
.containsExactlyInAnyOrder(Row.of(1, "1", "1", null, 4L, 1, 4));
Copy link
Contributor

Choose a reason for hiding this comment

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

Because it is last_non_null_value, its corresponding sequence_field should not be updated? I feel like we need to introduce a new option prefix, otherwise there may be some semantic issues. Here, we need an exclusive sequence_group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] The first_value's result is not correct
2 participants