Function
_sanitize_table
(table, new_schema, flavor)
Source from the content-addressed store, hash-verified
| 740 | |
| 741 | |
| 742 | def _sanitize_table(table, new_schema, flavor): |
| 743 | # TODO: This will not handle prohibited characters in nested field names |
| 744 | if 'spark' in flavor: |
| 745 | column_data = [table[i] for i in range(table.num_columns)] |
| 746 | return pa.Table.from_arrays(column_data, schema=new_schema) |
| 747 | else: |
| 748 | return table |
| 749 | |
| 750 | |
| 751 | _parquet_writer_arg_docs = """version : {"1.0", "2.4", "2.6"}, default "2.6" |
Tested by
no test coverage detected