upsert-include-key-after.td 1002 B

123456789101112131415161718192021222324252627282930313233
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. $ set keyschema={
  10. "type": "record",
  11. "name": "Key",
  12. "fields": [
  13. {"name": "f1", "type": "long"},
  14. {"name": "key2", "type": "long"}
  15. ]
  16. }
  17. $ set schema={
  18. "type" : "record",
  19. "name" : "test",
  20. "fields" : [
  21. {"name":"f2", "type":"long"}
  22. ]
  23. }
  24. # Delete 5K records post-restart
  25. $ kafka-ingest format=avro topic=include-key key-format=avro key-schema=${keyschema} schema=${schema} repeat=5000
  26. {"f1": ${kafka-ingest.iteration}, "key2": 1}
  27. > SELECT COUNT(*), MIN((named).f1), MAX((named).f1), MIN(f2) , MAX(f2) FROM include_key_tbl;
  28. 5000 5000 9999 5000 9999