()
| 847 | |
| 848 | #[test] |
| 849 | fn versioned_int_default_zero_not_null() { |
| 850 | // Schema gained a NOT NULL column with DEFAULT 0. |
| 851 | let mut schema = base_schema(); |
| 852 | let mut col = ColumnDef::required("score", ColumnType::Int64).with_default("0"); |
| 853 | col.added_at_version = 2; |
| 854 | schema.columns.push(col); |
| 855 | schema.version = 2; |
| 856 | |
| 857 | let decoder = TupleDecoder::new(&schema); |
| 858 | let tuple = base_tuple(); |
| 859 | |
| 860 | // Column 2 (score) did not exist when the tuple was written (old_col_count=2). |
| 861 | let val = decoder.extract_value_versioned(&tuple, 2, 2).unwrap(); |
| 862 | assert_eq!(val, Value::Integer(0), "expected default 0, not null"); |
| 863 | } |
| 864 | |
| 865 | #[test] |
| 866 | fn versioned_text_default_pending_not_null() { |
nothing calls this directly
no test coverage detected