@@ -192,8 +192,8 @@ pub struct SchemaQuery {
192192
193193/// Render a schema response for `GET /logstream/{logstream}/schema`.
194194///
195- /// Use `?format=compact` for UTF-8 `text/plain` rows of `name`, `type`, and
196- /// `nullable`; omitting `format` (or using `json`) preserves the Arrow JSON response.
195+ /// Use `?format=compact` for UTF-8 `text/plain` rows of `name`, `type`;
196+ /// omitting `format` (or using `json`) preserves the Arrow JSON response.
197197/// Backslashes, tabs, carriage returns, and newlines in names and type displays are
198198/// escaped as `\\`, `\t`, `\r`, and `\n` so every field remains one TSV row.
199199fn schema_response ( schema : & Schema , format : SchemaFormat ) -> HttpResponse {
@@ -206,16 +206,14 @@ fn schema_response(schema: &Schema, format: SchemaFormat) -> HttpResponse {
206206}
207207
208208fn compact_schema ( schema : & Schema ) -> String {
209- let mut output = String :: from ( "name\t type\t nullable \ n " ) ;
209+ let mut output = String :: from ( "name\t type\n " ) ;
210210 for field in schema. fields ( ) {
211211 append_escaped_compact_field ( & mut output, field. name ( ) ) ;
212212 output. push ( '\t' ) ;
213213 append_escaped_compact_field (
214214 & mut output,
215215 & compact_data_type ( field. data_type ( ) ) . to_string ( ) ,
216216 ) ;
217- output. push ( '\t' ) ;
218- output. push_str ( if field. is_nullable ( ) { "true" } else { "false" } ) ;
219217 output. push ( '\n' ) ;
220218 }
221219 output
@@ -284,8 +282,8 @@ fn append_escaped_compact_field(output: &mut String, value: &str) {
284282}
285283
286284/// Fetch the full Arrow JSON schema, or request `?format=compact` for a smaller TSV response.
287- /// Compact output includes all column names, type displays and nullability , but omits
288- /// schema/field metadata and dictionary IPC attributes; it is not an Arrow interchange format.
285+ /// Compact output includes all column names, type displays, but omits
286+ /// schema/field metadata, nullability and dictionary IPC attributes; it is not an Arrow interchange format.
289287pub async fn get_schema (
290288 req : HttpRequest ,
291289 logstream : Path < String > ,
@@ -1023,13 +1021,13 @@ mod tests {
10231021 . to_owned ( ) ;
10241022 assert_eq ! (
10251023 compact,
1026- "name\t type\t nullable \ n\
1027- nested\t Struct(\" inner\" : non-null Int64)\t true \ n\
1028- list\t List(non-null Utf8)\t false \ n\
1029- dictionary\t Dictionary(Int32, Utf8)\t true \ n\
1030- dictionary_struct\t Dictionary(Int32, Struct(\" dictionary_inner\" : Utf8))\t false \ n\
1031- timestamp\t Timestamp(ns, \" UTC\" )\t false \ n\
1032- awk\\ \\ ward\\ tname\\ r\\ n\t Utf8\t true \ n "
1024+ "name\t type\n \
1025+ nested\t Struct(\" inner\" : non-null Int64)\n \
1026+ list\t List(non-null Utf8)\n \
1027+ dictionary\t Dictionary(Int32, Utf8)\n \
1028+ dictionary_struct\t Dictionary(Int32, Struct(\" dictionary_inner\" : Utf8))\n \
1029+ timestamp\t Timestamp(ns, \" UTC\" )\n \
1030+ awk\\ \\ ward\\ tname\\ r\\ n\t Utf8\n "
10331031 ) ;
10341032 assert ! ( !compact. contains( "schema-metadata" ) ) ;
10351033 assert ! ( !compact. contains( "inner-metadata" ) ) ;
@@ -1055,7 +1053,7 @@ mod tests {
10551053
10561054 #[ core:: prelude:: v1:: test]
10571055 fn compact_schema_handles_empty_schemas_and_reduces_500_column_payloads ( ) {
1058- assert_eq ! ( compact_schema( & Schema :: empty( ) ) , "name\t type\t nullable \ n " ) ;
1056+ assert_eq ! ( compact_schema( & Schema :: empty( ) ) , "name\t type\n " ) ;
10591057
10601058 let schema = Schema :: new (
10611059 ( 0 ..500 )
0 commit comments