Skip to content

Commit

Permalink
add condition prior to action
Browse files Browse the repository at this point in the history
Signed-off-by: Gal Salomon <gal.salomon@gmail.com>
  • Loading branch information
galsalomon66 committed Mar 13, 2024
1 parent bf0e1b5 commit 22f13e7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions include/s3select.h
Original file line number Diff line number Diff line change
Expand Up @@ -3052,18 +3052,21 @@ class parquet_object : public base_s3object
#define S3SELECT_RESPONSE_SIZE_LIMIT (4 * 1024 * 1024)
if (result.size() > S3SELECT_RESPONSE_SIZE_LIMIT)
{//AWS-cli limits response size the following callbacks send response upon some threshold
m_fp_s3select_result_format(result);
if(m_fp_s3select_result_format)
m_fp_s3select_result_format(result);

if (!is_end_of_stream() && (get_sql_processing_status() != Status::LIMIT_REACHED))
{
m_fp_s3select_header_format(result);
if(m_fp_s3select_header_format)
m_fp_s3select_header_format(result);
}
}
else
{
if (is_end_of_stream() || (get_sql_processing_status() == Status::LIMIT_REACHED))
{
m_fp_s3select_result_format(result);
if(m_fp_s3select_result_format)
m_fp_s3select_result_format(result);
}
}

Expand Down

0 comments on commit 22f13e7

Please sign in to comment.