Skip to content

Commit 6fe6fc8

Browse files
committed
fix(ingress): clarify column_bool_opt None behavior, drop redundant decimal test
- column_bool_opt: spell out that None skips the column entirely rather than writing false — readers wanting an explicit false should call column_bool directly. - Remove test_buffer_opt_decimal_some_matches_standard; the main V3 test already round-trips column_dec_opt("c_dec", Some(...)) against column_dec.
1 parent 02c3607 commit 6fe6fc8

2 files changed

Lines changed: 3 additions & 20 deletions

File tree

questdb-rs/src/ingress/buffer.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,9 @@ impl Buffer {
871871
}
872872

873873
/// Record a boolean value for the given column if the value is `Some`.
874-
/// If the value is `None`, this is a no-op and the column is skipped.
874+
/// If the value is `None`, this is a no-op and the column is skipped
875+
/// entirely — it is **not** written as `false`. If you need an explicit
876+
/// `false`, call [`Self::column_bool`] directly.
875877
///
876878
/// This is a convenience wrapper around [`Self::column_bool`].
877879
///

questdb-rs/src/tests/buffer_opt.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -140,22 +140,3 @@ fn test_buffer_opt_array_some_binary_match() -> TestResult {
140140
Ok(())
141141
}
142142

143-
#[test]
144-
fn test_buffer_opt_decimal_some_matches_standard() -> TestResult {
145-
// Decimals require V3.
146-
let version = ProtocolVersion::V3;
147-
let mut opt_buf = Buffer::new(version);
148-
opt_buf
149-
.table("test")?
150-
.column_dec_opt("dec", Some("123.45"))?;
151-
152-
let mut std_buf = Buffer::new(version);
153-
std_buf.table("test")?.column_dec("dec", "123.45")?;
154-
155-
assert_eq!(
156-
std::str::from_utf8(opt_buf.as_bytes())?,
157-
std::str::from_utf8(std_buf.as_bytes())?
158-
);
159-
160-
Ok(())
161-
}

0 commit comments

Comments
 (0)