From 918d2e981ef5d4e6d6b50812fc506fc9c0eee3a3 Mon Sep 17 00:00:00 2001 From: Gal Salomon Date: Tue, 3 Sep 2024 08:16:35 +0300 Subject: [PATCH] removing the JSON format part, it is not align with the current s3-tests (will be done on different part) Signed-off-by: Gal Salomon --- src/rgw/rgw_s3select.cc | 16 +--------------- src/rgw/rgw_s3select_private.h | 5 ----- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/rgw/rgw_s3select.cc b/src/rgw/rgw_s3select.cc index 79e6c53167ec9..4b1d0ebfef123 100644 --- a/src/rgw/rgw_s3select.cc +++ b/src/rgw/rgw_s3select.cc @@ -287,7 +287,6 @@ RGWSelectObj_ObjStore_S3::RGWSelectObj_ObjStore_S3(): m_object_size_for_processing(0), m_parquet_type(false), m_json_type(false), - m_outputFormat(OutputFormat::CSV), chunk_number(0), m_requested_range(0), m_scan_offset(1024), @@ -427,9 +426,7 @@ int RGWSelectObj_ObjStore_S3::run_s3select_on_csv(const char* query, const char* } else if (m_header_info.compare("USE")==0) { csv.use_header_info=true; } - if (m_outputFormat == OutputFormat::JSON) { - csv.output_json_format = true; - } + m_s3_csv_object.set_csv_query(&s3select_syntax, csv); m_s3_csv_object.set_external_system_functions(fp_s3select_continue, @@ -482,9 +479,6 @@ int RGWSelectObj_ObjStore_S3::run_s3select_on_parquet(const char* query) //parsing the SQL statement. s3select_syntax.parse_query(m_sql_query.c_str()); parquet_object::csv_definitions parquet; - if (m_outputFormat == OutputFormat::JSON) { - parquet.output_json_format = true; - } m_s3_parquet_object.set_external_system_functions(fp_s3select_continue, fp_s3select_result_format, @@ -544,10 +538,6 @@ int RGWSelectObj_ObjStore_S3::run_s3select_on_json(const char* query, const char return -EINVAL; } - if (m_outputFormat == OutputFormat::JSON) { - json.output_json_format = true; - } - //parsing the SQL statement s3select_syntax.parse_query(m_sql_query.c_str()); if (s3select_syntax.get_error_description().empty() == false) { @@ -629,10 +619,6 @@ int RGWSelectObj_ObjStore_S3::handle_aws_cli_parameters(std::string& sql_query) ldpp_dout(this, 10) << "s3select: engine is set to process Parquet objects" << dendl; } - if (m_s3select_query.find(output_tag+">", 0); diff --git a/src/rgw/rgw_s3select_private.h b/src/rgw/rgw_s3select_private.h index 87d180acebc0f..7beac4f4a5d88 100644 --- a/src/rgw/rgw_s3select_private.h +++ b/src/rgw/rgw_s3select_private.h @@ -241,11 +241,6 @@ private: const char* s3select_json_error = "InvalidJsonType"; public: - enum class OutputFormat { - CSV, - JSON - }; - OutputFormat m_outputFormat; unsigned int chunk_number; size_t m_requested_range; size_t m_scan_offset; -- 2.39.5