From: galsalomon66 Date: Wed, 17 Nov 2021 17:55:48 +0000 (+0200) Subject: in the case Presto is push-down query, it also send output-serialization parameter... X-Git-Tag: v17.1.0~207^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f05cdb71eea23fdaabf6f95142e1906de3f4ee6f;p=ceph.git in the case Presto is push-down query, it also send output-serialization parameter(' '), that should be handle as '\n' Signed-off-by: galsalomon66 --- diff --git a/src/rgw/rgw_rest_s3.cc b/src/rgw/rgw_rest_s3.cc index 426a23324bc2..5594ea75fa55 100644 --- a/src/rgw/rgw_rest_s3.cc +++ b/src/rgw/rgw_rest_s3.cc @@ -6620,6 +6620,14 @@ int RGWSelectObj_ObjStore_S3::handle_aws_cli_parameters(std::string& sql_query) extract_by_tag(m_s3select_output, "QuoteFields", output_quote_fields); extract_by_tag(m_s3select_output, "RecordDelimiter", output_row_delimiter); + if (output_row_delimiter.size()==0) { + output_row_delimiter='\n'; + } + else if(output_row_delimiter.compare(" ") == 0) + {//presto change + output_row_delimiter='\n'; + } + if (m_compression_type.length()>0 && m_compression_type.compare("NONE") != 0) { ldpp_dout(this, 10) << "RGW supports currently only NONE option for compression type" << dendl; return -1;