Add COPY for import and export #139
Conversation
| %type <group_t> opt_group | ||
| %type <alias_t> opt_table_alias table_alias opt_alias alias | ||
| %type <with_description_t> with_description | ||
| %type <import_type_t> opt_file_type import_file_type |
There was a problem hiding this comment.
Could you harmonize the mix of file_type, import_file_type, and import_type?
There was a problem hiding this comment.
I myself would prefer using FileType instead of ImportType in general for both Import and Export statement (so it would sense for both). I just thought renaming it could be a thing regarding downwards compatibility.
There was a problem hiding this comment.
Ok, in that case, please add a comment.
There was a problem hiding this comment.
Do I get it right and renaming ImportType to FileType and altering its values to kFileCSV, ... with just adding a comment there that this has been done is okay?
There was a problem hiding this comment.
My thought was to leave it as it, but add comments where appropriate that this is done for compat reasons
There was a problem hiding this comment.
Alright, are those two comments enough?
| * COPY students TO 'test/students.tbl' (WITH FORMAT TBL) | ||
| ******************************/ | ||
| export_statement: | ||
| COPY table_name TO file_path opt_file_type { |
There was a problem hiding this comment.
As this uses opt_file_type, too, it is weird that opt_file_type has a import_file_type in an export context
| DIRECT | ||
| SORTED | ||
|
|
||
| COPY |
There was a problem hiding this comment.
I don't know, I just thought it is somehow common to update it
| namespace hsql { | ||
| // Represents SQL Export statements. | ||
| struct ExportStatement : SQLStatement { | ||
| ExportStatement(ImportType type); |
refs hyrise/hyrise#1933