You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/08 14:15:56 UTC

[GitHub] [incubator-doris] cambyzju commented on a diff in pull request #8765: [Feature] CSV import and export support header

cambyzju commented on code in PR #8765:
URL: https://github.com/apache/incubator-doris/pull/8765#discussion_r846157750


##########
be/src/runtime/file_result_writer.cpp:
##########
@@ -216,12 +218,82 @@ std::string FileResultWriter::_file_format_to_name() {
         return "unknown";
     }
 }
+std::string FileResultWriter::gen_types() {
+    std::string types = "";
+    int num_columns = _output_expr_ctxs.size();
+    for (int i = 0; i < num_columns; ++i) {
+        switch (_output_expr_ctxs[i]->root()->type().type) {
+        case TYPE_BOOLEAN:
+        case TYPE_TINYINT:
+            types += "TINYINT";

Review Comment:
   1. can we use type_to_string in primitive_type.cpp?
   2. the string for types, it is better the same as types name in create table SQL?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org