This is an automated email from the ASF dual-hosted git repository.
xuyang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new ab9529f6b5 [enhancement](array-type) support export files in 'select
into outfile' (#11703)
ab9529f6b5 is described below
commit ab9529f6b5ef4731e206b4db2a89823dbf3f6891
Author: carlvinhust2012 <[email protected]>
AuthorDate: Mon Aug 15 12:34:31 2022 +0800
[enhancement](array-type) support export files in 'select into outfile'
(#11703)
this pr is used to support export array type in 'select into outfile'.
Co-authored-by: hucheng01 <[email protected]>
---
be/src/runtime/file_result_writer.cpp | 6 ++++++
be/src/vec/runtime/vfile_result_writer.cpp | 4 ++++
2 files changed, 10 insertions(+)
diff --git a/be/src/runtime/file_result_writer.cpp
b/be/src/runtime/file_result_writer.cpp
index 8e7ee645b7..3c115b6cac 100644
--- a/be/src/runtime/file_result_writer.cpp
+++ b/be/src/runtime/file_result_writer.cpp
@@ -337,6 +337,12 @@ Status FileResultWriter::_write_one_row_as_csv(TupleRow*
row) {
}
break;
}
+ case TYPE_ARRAY: {
+ auto col_type = _output_expr_ctxs[i]->root()->type();
+ int output_scale =
_output_expr_ctxs[i]->root()->output_scale();
+ RawValue::print_value(item, col_type, output_scale,
&_plain_text_outstream);
+ break;
+ }
default: {
// not supported type, like BITMAP, HLL, just export null
_plain_text_outstream << NULL_IN_CSV;
diff --git a/be/src/vec/runtime/vfile_result_writer.cpp
b/be/src/vec/runtime/vfile_result_writer.cpp
index a132eb696d..1a250a8010 100644
--- a/be/src/vec/runtime/vfile_result_writer.cpp
+++ b/be/src/vec/runtime/vfile_result_writer.cpp
@@ -312,6 +312,10 @@ Status VFileResultWriter::_write_csv_file(const Block&
block) {
_plain_text_outstream << col.type->to_string(*col.column,
i);
break;
}
+ case TYPE_ARRAY: {
+ _plain_text_outstream << col.type->to_string(*col.column,
i);
+ break;
+ }
default: {
// not supported type, like BITMAP, HLL, just export null
_plain_text_outstream << NULL_IN_CSV;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]