(
*, with_native_record_key: bool, parse_utf8: bool, with_metadata: bool
)
| 218 | |
| 219 | |
| 220 | def construct_raw_data_schema_by_flags( |
| 221 | *, with_native_record_key: bool, parse_utf8: bool, with_metadata: bool |
| 222 | ) -> type[pw.Schema]: |
| 223 | Schema: Any |
| 224 | if parse_utf8: |
| 225 | Schema = PlaintextDataSchema |
| 226 | if with_native_record_key: |
| 227 | Schema = Schema | PlaintextKeySchema |
| 228 | else: |
| 229 | Schema = RawDataSchema |
| 230 | if with_native_record_key: |
| 231 | Schema = Schema | RawKeySchema |
| 232 | if with_metadata: |
| 233 | Schema = Schema | MetadataSchema |
| 234 | return Schema |
| 235 | |
| 236 | |
| 237 | def construct_schema_and_data_format( |
no outgoing calls
no test coverage detected