Commit 42c1ccc
committed
Introduce support for user-defined parser preprocessors.
Note that this API is still experimental, and may be changed without notice.
Preprocessors are supported for connectors that receive raw data
(i.e., byte arrays). A preprocessor runs between the transport
and the parser and has a chance to transform the byte arrays
before they are handed off to the parser. Preprocessors are
implemented by supplying several trait implementations in udf.rs;
the two essential traits are `Preprocessor` and `PreprocessorFactory`.
The factory is responsible for creating a preprocessor based on
the configuration supplied in the connector.
As an example, consider the following fragment of a connector configuration
for a table:
```
'connectors' = '[{
"transport": { ... },
"preprocessor": [{
"name": "example",
"message_oriented": true,
"config": {}
}],
```
This configuration expects the user to supply two structs in udf.rs:
`ExamplePreprocessor implements Preprocessor` and `ExamplePreprocessorFactory
implements PreprocessorFactory`. The compiler will generate code to create
an instance of `ExamplePreprocessor` at runtime for this connector.
There are two flavors of preprocessors: message-oriented, and streaming.
Currently only the message-oriented preprocessors are supported with
fault-tolerance. Briefly, a message-oriented preprocessor splits the
input stream into messages such that each message can be parsed independently
by the following parser.
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>1 parent 19a69ae commit 42c1ccc
File tree
48 files changed
+2195
-272
lines changed- crates
- adapterlib
- src
- errors
- adapters/src
- adhoc
- controller
- format
- avro
- static_compile
- test
- transport
- http
- kafka/ft
- feldera-types/src
- pipeline-manager/src/db/types
- docs.feldera.com/docs/sql
- python/tests/runtime
- sql-to-dbsp-compiler
- SQL-compiler/src
- main/java/org/dbsp
- sqlCompiler
- compiler
- backend/rust
- multi
- errors
- frontend
- calciteCompiler
- statements
- util
- test/java/org/dbsp/sqlCompiler/compiler/sql
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
48 files changed
+2195
-272
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
888 | 889 | | |
889 | 890 | | |
890 | 891 | | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
891 | 895 | | |
892 | 896 | | |
893 | 897 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
679 | 679 | | |
680 | 680 | | |
681 | 681 | | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
682 | 688 | | |
683 | 689 | | |
684 | 690 | | |
| |||
937 | 943 | | |
938 | 944 | | |
939 | 945 | | |
| 946 | + | |
940 | 947 | | |
941 | 948 | | |
942 | 949 | | |
| |||
999 | 1006 | | |
1000 | 1007 | | |
1001 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
1002 | 1018 | | |
1003 | 1019 | | |
1004 | 1020 | | |
| |||
1567 | 1583 | | |
1568 | 1584 | | |
1569 | 1585 | | |
| 1586 | + | |
1570 | 1587 | | |
1571 | 1588 | | |
1572 | 1589 | | |
| |||
0 commit comments