friendlymatthew commented on code in PR #7921:
URL: https://github.com/apache/arrow-rs/pull/7921#discussion_r2217256717


##########
parquet-variant-compute/src/shredding.rs:
##########
@@ -0,0 +1,349 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+use arrow_schema::{ArrowError, DataType, Fields};
+
+// Keywords defined by the shredding spec
+pub const METADATA: &str = "metadata";
+pub const VALUE: &str = "value";
+pub const TYPED_VALUE: &str = "typed_value";
+
+pub fn validate_value_and_typed_value(
+    fields: &Fields,
+    allow_both_null: bool,

Review Comment:
   My thinking was `value` and `typed_value` _can_ be both null for objects. 
   
   Per the spec: 
   > A field's value and typed_value are set to null (missing) to indicate that 
the field does not exist in the variant. To encode a field that is present with 
a null value, the value must contain a Variant null: basic type 0 (primitive) 
and physical type 0 (null).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to