Function
_sanitize_table
(table, new_schema, flavor)
Source from the content-addressed store, hash-verified
| 749 | |
| 750 | |
| 751 | def _sanitize_table(table, new_schema, flavor): |
| 752 | # TODO: This will not handle prohibited characters in nested field names |
| 753 | if 'spark' in flavor: |
| 754 | column_data = [table[i] for i in range(table.num_columns)] |
| 755 | return pa.Table.from_arrays(column_data, schema=new_schema) |
| 756 | else: |
| 757 | return table |
| 758 | |
| 759 | |
| 760 | _parquet_writer_arg_docs = """version : {"1.0", "2.4", "2.6"}, default "2.6" |
Tested by
no test coverage detected