Skip to content

Conversation

HeartLinked
Copy link
Contributor

  • Implements the complete type casting logic for iceberg::Literal in the LiteralCaster class to align with the Java reference implementation. This is critical for expression evaluation and predicate pushdown.
  • Add basic implementation for fixed type.
  • Updated ToString() to match Java's output format for better consistency (e.g., X'...' for binary).
  • Added comprehensive unit tests to validate all new casting logic and ToString() formatting.

@HeartLinked HeartLinked force-pushed the feat/literal2 branch 2 times, most recently from cf43748 to 406a3f2 Compare September 10, 2025 06:26
case TypeId::kTimestamp:
case TypeId::kTimestampTz: {
throw IcebergError("Not implemented: ToString for " + type_->ToString());
return std::to_string(std::get<int64_t>(value_));
Copy link
Member

Choose a reason for hiding this comment

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

I think these switch cases can be easily rewritten by return std::to_string(std::get<typename LiteralTraits<type_id>::ValueType>(value_)); once #185 is merged.

@HeartLinked HeartLinked force-pushed the feat/literal2 branch 2 times, most recently from a194923 to 0abbf84 Compare October 10, 2025 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants