@@ -59,10 +59,53 @@ message ReadSession {
5959
6060 // Options dictating how we read a table.
6161 message TableReadOptions {
62- // Names of the fields in the table that should be read. If empty, all
63- // fields will be read. If the specified field is a nested field, all
64- // the sub-fields in the field will be selected. The output field order is
65- // unrelated to the order of fields in selected_fields.
62+ // Optional. The names of the fields in the table to be returned. If no
63+ // field names are specified, then all fields in the table are returned.
64+ //
65+ // Nested fields -- the child elements of a STRUCT field -- can be selected
66+ // individually using their fully-qualified names, and will be returned as
67+ // record fields containing only the selected nested fields. If a STRUCT
68+ // field is specified in the selected fields list, all of the child elements
69+ // will be returned.
70+ //
71+ // As an example, consider a table with the following schema:
72+ //
73+ // {
74+ // "name": "struct_field",
75+ // "type": "RECORD",
76+ // "mode": "NULLABLE",
77+ // "fields": [
78+ // {
79+ // "name": "string_field1",
80+ // "type": "STRING",
81+ // . "mode": "NULLABLE"
82+ // },
83+ // {
84+ // "name": "string_field2",
85+ // "type": "STRING",
86+ // "mode": "NULLABLE"
87+ // }
88+ // ]
89+ // }
90+ //
91+ // Specifying "struct_field" in the selected fields list will result in a
92+ // read session schema with the following logical structure:
93+ //
94+ // struct_field {
95+ // string_field1
96+ // string_field2
97+ // }
98+ //
99+ // Specifying "struct_field.string_field1" in the selected fields list will
100+ // result in a read session schema with the following logical structure:
101+ //
102+ // struct_field {
103+ // string_field1
104+ // }
105+ //
106+ // The order of the fields in the read session schema is derived from the
107+ // table schema and does not correspond to the order in which the fields are
108+ // specified in this list.
66109 repeated string selected_fields = 1 ;
67110
68111 // SQL text filtering statement, similar to a WHERE clause in a query.
@@ -80,6 +123,9 @@ message ReadSession {
80123 oneof output_format_serialization_options {
81124 // Optional. Options specific to the Apache Arrow output format.
82125 ArrowSerializationOptions arrow_serialization_options = 3 [(google.api.field_behavior ) = OPTIONAL ];
126+
127+ // Optional. Options specific to the Apache Avro output format
128+ AvroSerializationOptions avro_serialization_options = 4 [(google.api.field_behavior ) = OPTIONAL ];
83129 }
84130 }
85131
0 commit comments