fn test_construct_schema()

in crates/iceberg/src/spec/schema.rs [95:110]


    fn test_construct_schema() {
        let field1 = NestedField::required(1, "f1", Type::Primitive(PrimitiveType::Boolean));
        let field2 = NestedField::optional(2, "f2", Type::Primitive(PrimitiveType::Int));

        let schema = Schema::builder()
            .with_fields(vec![field1.clone()])
            .with_fields(vec![field2.clone()])
            .with_schema_id(3)
            .build();

        assert_eq!(3, schema.schema_id());
        assert_eq!(2, schema.highest_field_id());
        assert_eq!(Some(&field1), schema.field_by_id(1));
        assert_eq!(Some(&field2), schema.field_by_id(2));
        assert_eq!(None, schema.field_by_id(3));
    }