remove limit on query restuls

This commit is contained in:
dal 2025-04-21 13:42:47 -06:00
parent e4b6b42211
commit c52bf5e1c2
No known key found for this signature in database
GPG Key ID: 16F4B0E1E9F61122
1 changed files with 1 additions and 6 deletions

View File

@ -1493,12 +1493,7 @@ fn convert_array_to_datatype(column: &arrow::array::ArrayRef, field: &Field, row
fn prepare_query(query: &str) -> String { fn prepare_query(query: &str) -> String {
const MAX_ROWS: usize = 1_000; const MAX_ROWS: usize = 1_000;
let query_no_semicolon = query.trim_end_matches(';'); query.to_string()
if !query_no_semicolon.to_lowercase().contains("limit") {
format!("{} FETCH FIRST {} ROWS ONLY", query_no_semicolon, MAX_ROWS)
} else {
query_no_semicolon.to_string()
}
} }
fn process_record_batch(batch: &RecordBatch) -> Vec<IndexMap<String, DataType>> { fn process_record_batch(batch: &RecordBatch) -> Vec<IndexMap<String, DataType>> {