Skip to content

Commit 852dbca

Browse files
committed
Add introduce of reader registry
1 parent c1234c8 commit 852dbca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/design/cpp_data_feeding.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ In this document, we show the fundamental design of a C++ data feeding process,
1313
In order to handle the above-mentioned problem, a new concept called 'Reader' is introduced. `Reader` is a series of inherited classes which can be held by our `Variable` and they are used to read or process file data.
1414

1515

16-
### `ReaderBase`
16+
### ReaderBase
1717

1818
`ReaderBase` is the abstract base class for all readers. It defines the interface for all readers.
1919

@@ -121,7 +121,9 @@ However, direct usage of file readers' creation ops is not recommended because a
121121

122122
### OpenFilesOp
123123

124-
The `OpenFilesOp` is the creation op of `MultipleReader`. It takes no input but requires a list of file names as one of its attributes. The newly created `MultipleReader` then creates corresponding prefetching readers according to file formats.
124+
The `OpenFilesOp` is the creation op of `MultipleReader`. It takes no input but requires a list of file names as one of its attributes. The newly created `MultipleReader` then creates its own prefetching readers according to given file names.
125+
126+
To make sure that created prefetching readers match file formats, we need a name prefix rule to append file format tags to file names, as well as a file reader registry mechanism to map file format tags to their corresponding file readers' constructors.
125127

126128
### HasNextOp
127129

0 commit comments

Comments
 (0)