blackmwk commented on code in PR #3091:
URL: https://github.com/apache/iceberg-rust/pull/3091#discussion_r3879277096
##########
crates/iceberg/src/scan/task.rs:
##########
@@ -18,35 +18,148 @@
use std::sync::Arc;
use futures::stream::BoxStream;
-use serde::{Deserialize, Serialize, Serializer};
+use serde::{Deserialize, Serialize};
use typed_builder::TypedBuilder;
use crate::Result;
use crate::expr::BoundPredicate;
use crate::spec::{
- DataContentType, DataFileFormat, ManifestEntryRef, NameMapping,
PartitionSpec, Schema,
- SchemaRef, Struct, StructType,
+ DataContentType, DataFileFormat, Literal, ManifestEntryRef, NameMapping,
PartitionSpec,
+ PrimitiveLiteral, Schema, SchemaRef, Struct, StructType,
};
/// A stream of [`FileScanTask`].
pub type FileScanTaskStream = BoxStream<'static, Result<FileScanTask>>;
-/// Serialization helper that always returns NotImplementedError.
-/// Used for fields that should not be serialized but we want to be explicit
about it.
-fn serialize_not_implemented<S, T>(_: &T, _: S) -> std::result::Result<S::Ok,
S::Error>
-where S: Serializer {
- Err(serde::ser::Error::custom(
- "Serialization not implemented for this field",
- ))
-}
+mod partition_serde {
Review Comment:
No, you should implement serde for Literal
##########
crates/iceberg/src/scan/task.rs:
##########
@@ -282,3 +387,50 @@ pub struct FileScanTaskDeleteFile {
#[builder(default)]
pub key_metadata: Option<Box<[u8]>>,
}
+
+#[cfg(test)]
Review Comment:
Remove this.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]