Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

minor: Fix double API doc #226

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/iceberg/src/spec/datatypes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ pub enum PrimitiveType {
Int,
/// 64-bit signed integer
Long,
/// 32-bit IEEE 754 floating bit.
/// 32-bit IEEE 754 floating point.
Float,
/// 64-bit IEEE 754 floating bit.
/// 64-bit IEEE 754 floating point.
Comment on lines +174 to +176
Copy link
Member Author

@viirya viirya Mar 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks weird. Fix it based on the doc: https://iceberg.apache.org/spec/#primitive-types

Double,
/// Fixed point decimal
Decimal {
/// Precision
/// Precision, must be 38 or less
precision: u32,
/// Scale
scale: u32,
Expand Down
12 changes: 6 additions & 6 deletions crates/iceberg/src/spec/values.rs
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ impl Datum {
}
}

/// Creates an 32bit floating point number.
/// Creates an 64bit floating point number.
///
/// Example:
/// ```rust
Expand Down Expand Up @@ -265,7 +265,7 @@ impl Datum {
}
}

/// Creates a date in `%Y-%m-%d` format, assume in utc timezone.
/// Creates date literal in `%Y-%m-%d` format, assume in utc timezone.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply to make the doc consistent with other date APIs.

///
/// See [`NaiveDate::from_str`].
///
Expand All @@ -289,7 +289,7 @@ impl Datum {
Ok(Self::date(date_from_naive_date(t)))
}

/// Create a date from calendar date (year, month and day).
/// Create date literal from calendar date (year, month and day).
///
/// See [`NaiveDate::from_ymd_opt`].
///
Expand All @@ -313,9 +313,9 @@ impl Datum {
Ok(Self::date(date_from_naive_date(t)))
}

/// Creates time in microseconds directly.
/// Creates time literal in microseconds directly.
///
/// It will returns error when it's negative or too large to fit in 24 hours.
/// It will return error when it's negative or too large to fit in 24 hours.
///
/// Example:
///
Expand Down Expand Up @@ -364,7 +364,7 @@ impl Datum {
}
}

/// Creates time in microseconds in `%H:%M:%S:.f` format.
/// Creates time literal in microseconds in `%H:%M:%S:.f` format.
///
/// See [`NaiveTime::from_str`] for details.
///
Expand Down
Loading