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
@HeartLinked HeartLinked force-pushed the feat/literal2 branch 2 times, most recently from 56088c8 to b10b3d9 Compare October 11, 2025 02:46
@HeartLinked
Copy link
Contributor Author

@Fokko I have resolved the conflicts and now ready for merge. Thanks!

@Fokko
Copy link
Contributor

Fokko commented Oct 13, 2025

@HeartLinked It looks like more conflicts surfaced 😢

@HeartLinked
Copy link
Contributor Author

HeartLinked commented Oct 13, 2025

@HeartLinked It looks like more conflicts surfaced 😢

This is due to the merge of #253 . I've fixed the conflicts again.

@Fokko Fokko merged commit 4ebf729 into apache:main Oct 13, 2025
7 checks passed
@Fokko
Copy link
Contributor

Fokko commented Oct 13, 2025

Thanks @HeartLinked !

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