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

[Bug] The first_value's result is not correct #3020

Open
2 tasks done
Aitozi opened this issue Mar 15, 2024 · 0 comments · May be fixed by #3101
Open
2 tasks done

[Bug] The first_value's result is not correct #3020

Aitozi opened this issue Mar 15, 2024 · 0 comments · May be fixed by #3101
Assignees
Labels
bug Something isn't working

Comments

@Aitozi
Copy link
Contributor

Aitozi commented Mar 15, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Paimon version

0.7

Compute Engine

Flink

Minimal reproduce step

CREATE TABLE T (
k INT,
a INT,
b VARCHAR,
c VARCHAR,
d VARCHAR,
PRIMARY KEY (k) NOT ENFORCED)
 WITH ('merge-engine'='aggregation', 
'changelog-producer' = 'full-compaction',
'fields.b.aggregate-function'='first_value',
'fields.c.aggregate-function'='first_non_null_value',
'fields.d.aggregate-function'='first_not_null_value',
'sequence.field'='a'
);
        @Test
        public void testUnOrderInput2() {
            batchSql("INSERT INTO T VALUES (1, 4, '4', '4', '4')");
            batchSql("INSERT INTO T VALUES (1, 2, '2', '2', '2')");
            batchSql("INSERT INTO T VALUES (1, 3, '3', '3', '3')");
            List<Row> result = batchSql("SELECT * FROM T");
            assertThat(result).containsExactlyInAnyOrder(Row.of(1, 2, "2", "2", "2"));
        }

The acutal result is +I[1, 4, 3, 3, 3]

What doesn't meet your expectations?

.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@Aitozi Aitozi added the bug Something isn't working label Mar 15, 2024
@Aitozi Aitozi self-assigned this Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant