MCPcopy Index your code
hub / github.com/pathwaycom/pathway / construct_raw_data_schema_by_flags

Function construct_raw_data_schema_by_flags

python/pathway/io/_utils.py:220–234  ·  view source on GitHub ↗
(
    *, with_native_record_key: bool, parse_utf8: bool, with_metadata: bool
)

Source from the content-addressed store, hash-verified

218
219
220def 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
237def construct_schema_and_data_format(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected