diff --git a/src/servers/src/http.rs b/src/servers/src/http.rs index 69a6557889..d87b92a069 100644 --- a/src/servers/src/http.rs +++ b/src/servers/src/http.rs @@ -136,7 +136,7 @@ impl TryFrom> for HttpRecordsOutput { #[serde(rename_all = "lowercase")] pub enum JsonOutput { AffectedRows(usize), - Rows(HttpRecordsOutput), + Records(HttpRecordsOutput), } #[derive(Serialize, Debug, JsonSchema)] @@ -173,14 +173,14 @@ impl JsonResponse { } Ok(Output::Stream(stream)) => match util::collect(stream).await { Ok(rows) => match HttpRecordsOutput::try_from(rows) { - Ok(rows) => Self::with_output(Some(JsonOutput::Rows(rows))), + Ok(rows) => Self::with_output(Some(JsonOutput::Records(rows))), Err(err) => Self::with_error(Some(format!(": {}", err))), }, Err(e) => Self::with_error(Some(format!("Recordbatch error: {}", e))), }, Ok(Output::RecordBatches(recordbatches)) => { match HttpRecordsOutput::try_from(recordbatches.take()) { - Ok(rows) => Self::with_output(Some(JsonOutput::Rows(rows))), + Ok(rows) => Self::with_output(Some(JsonOutput::Records(rows))), Err(err) => Self::with_error(Some(format!(": {}", err))), } } diff --git a/src/servers/tests/http/http_handler_test.rs b/src/servers/tests/http/http_handler_test.rs index 551c90e5b0..cf88b7fc6c 100644 --- a/src/servers/tests/http/http_handler_test.rs +++ b/src/servers/tests/http/http_handler_test.rs @@ -33,7 +33,7 @@ async fn test_sql_output_rows() { assert!(json.success(), "{:?}", json); assert!(json.error().is_none()); match json.output().expect("assertion failed") { - JsonOutput::Rows(records) => { + JsonOutput::Records(records) => { assert_eq!(1, records.num_rows()); } _ => unreachable!(),