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

JOIN on non-ROWKEY and PARTITION BY ROWKEY is broken #4053

Closed
agavra opened this issue Dec 5, 2019 · 1 comment · Fixed by #4090
Closed

JOIN on non-ROWKEY and PARTITION BY ROWKEY is broken #4053

agavra opened this issue Dec 5, 2019 · 1 comment · Fixed by #4090
Assignees
Labels

Comments

@agavra
Copy link
Contributor

agavra commented Dec 5, 2019

Describe the bug

    {
      "name": "partition by ROWKEY in join on non-ROWKEY",
      "statements": [
        "CREATE STREAM L (A STRING, B STRING) WITH (kafka_topic='LEFT', value_format='JSON', KEY='A');",
        "CREATE STREAM R (C STRING, D STRING) WITH (kafka_topic='RIGHT', value_format='JSON', KEY='C');",
        "CREATE STREAM OUTPUT AS SELECT L.A, L.B, R.C, R.D, L.ROWKEY, R.ROWKEY FROM L JOIN R WITHIN 10 SECONDS ON L.B = R.D PARTITION BY L.ROWKEY;"
      ],
      "comments": [
        "This test demonstrates a problem when we JOIN on a non-ROWKEY field and then PARTITION BY ",
        "a ROWKEY field. Note that the key is 'join' when it should be 'a' and the key-field is 'B' ",
        "when it should be 'L_ROWKEY'"
      ],
      "inputs": [
        {"topic": "LEFT", "key": "a", "value": {"A": "a", "B": "join"}},
        {"topic": "RIGHT", "key": "c", "value": {"C": "c", "D": "join"}}
      ],
      "outputs": [
        {"topic": "OUTPUT", "key": "join", "value": {"A": "a", "B": "join", "C": "c", "D": "join", "L_ROWKEY": "a", "R_ROWKEY": "c"}}
      ],
      "post": {
        "sources": [
          {"name": "OUTPUT", "type": "stream", "keyField": "B"}
        ]
      }

To Reproduce
Run the partition-by.json QTT test.

Expected behavior
The rowkey is L_ROWKEY and the value is a.

Actual behaviour
The rowkey is B is and the value is join

@agavra agavra added the bug label Dec 5, 2019
@agavra agavra self-assigned this Dec 5, 2019
@blueedgenick
Copy link
Contributor

blueedgenick commented Dec 9, 2019 via email

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

Successfully merging a pull request may close this issue.

2 participants