protobuf-recursive.td 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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-arg-default single-replica-cluster=quickstart
  10. # Test that recursive Protobuf types are unsupported.
  11. $ file-append path=recursive.proto
  12. syntax = "proto3";
  13. message Self {
  14. Self self = 1;
  15. }
  16. message Mutual1 {
  17. Mutual2 m = 1;
  18. }
  19. message Mutual2 {
  20. Mutual3 m = 1;
  21. }
  22. message Mutual3 {
  23. Mutual1 m = 1;
  24. }
  25. $ protobuf-compile-descriptors inputs=recursive.proto output=recursive.pb set-var=recursive-schema
  26. > CREATE CONNECTION kafka_conn
  27. TO KAFKA (BROKER '${testdrive.kafka-addr}', SECURITY PROTOCOL PLAINTEXT);
  28. $ kafka-create-topic topic=recursive partitions=1
  29. ! CREATE SOURCE recursive
  30. IN CLUSTER ${arg.single-replica-cluster}
  31. FROM KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-recursive-${testdrive.seed}')
  32. FORMAT PROTOBUF MESSAGE '.Self' USING SCHEMA '${recursive-schema}'
  33. contains:Recursive types are not supported: Self
  34. ! CREATE SOURCE recursive
  35. IN CLUSTER ${arg.single-replica-cluster}
  36. FROM KAFKA CONNECTION kafka_conn (TOPIC 'testdrive-recursive-${testdrive.seed}')
  37. FORMAT PROTOBUF MESSAGE '.Mutual1' USING SCHEMA '${recursive-schema}'
  38. contains:Recursive types are not supported: Mutual1