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

Function test_json_flatten

python/pathway/tests/test_json.py:418–437  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

416
417
418def test_json_flatten():
419 input = _json_table(
420 data=[[1, 2], [3], [4, 5]],
421 )
422
423 result = input.flatten(pw.this.data).select(data=pw.this.data.as_int())
424
425 assert_table_equality_wo_index(
426 T(
427 """
428 | data
429 1 | 1
430 2 | 2
431 3 | 3
432 4 | 4
433 5 | 5
434 """
435 ).update_types(data=Optional[int]),
436 result,
437 )
438
439
440@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 6

TFunction · 0.90
_json_tableFunction · 0.85
flattenMethod · 0.80
update_typesMethod · 0.80
selectMethod · 0.45
as_intMethod · 0.45

Tested by

no test coverage detected