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

Stream GROUP BY on ROWKEY does unnecessary repartition step #3367

Closed
big-andy-coates opened this issue Sep 17, 2019 · 2 comments
Closed

Stream GROUP BY on ROWKEY does unnecessary repartition step #3367

big-andy-coates opened this issue Sep 17, 2019 · 2 comments

Comments

@big-andy-coates
Copy link
Contributor

The following QTT test would fail due to the presence of a repartition topic. However, the GROUP BY is on ROWKEY and therefore no re-partition is required.

{
      "name": "ROWKEY (stream->table) - without repartition",
      "comment": [
        "Clone of test 'ROWKEY (stream->table)' but checking no repartition topic is created post v5.4"
      ],
      "statements": [
        "CREATE STREAM TEST (ignored VARCHAR) WITH (kafka_topic='test_topic', value_format='DELIMITED');",
        "CREATE TABLE OUTPUT AS SELECT ROWKEY, COUNT(*) FROM TEST GROUP BY ROWKEY;"
      ],
      "inputs": [
        {"topic": "test_topic", "key": 1, "value": "-"},
        {"topic": "test_topic", "key": 2, "value": "-"},
        {"topic": "test_topic", "key": 1, "value": "-"},
        {"topic": "test_topic", "key": 2, "value": "-"},
        {"topic": "test_topic", "key": 1, "value": "-"}
      ],
      "outputs": [
        {"topic": "OUTPUT", "key": "1", "value": "1"},
        {"topic": "OUTPUT", "key": "2", "value": "1"},
        {"topic": "OUTPUT", "key": "1", "value": "2"},
        {"topic": "OUTPUT", "key": "2", "value": "2"},
        {"topic": "OUTPUT", "key": "1", "value": "3"}
      ],
      "post": {
        "topics": {
          "blacklist": ".*-repartition"
        }
      }
@big-andy-coates
Copy link
Contributor Author

Related to #3366

@big-andy-coates
Copy link
Contributor Author

I've now fixed this.

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

No branches or pull requests

1 participant