apache / iceberg-rust

Apache Iceberg
https://rust.iceberg.apache.org/
Apache License 2.0
469 stars 95 forks source link

fix: make PrimitiveLiteral and Literal not be Ord #386

Closed ZENOTME closed 1 month ago

ZENOTME commented 1 month ago

This PR fix #378.

  1. It makes PrimitiveLiteral and Literal not be PartialOrd, Ord. And only Datum PartialOrd.
  2. After 1, it also changes the Manifest and ManifestList to use Datum in lower_bound && upper_bound

After Literal is not Ord, we can't use BTreeMap<Literal,_> anymore. I use HashMap to replace it. But to make HashMap hashable, we need to assign an order for it. I implement this in Map.

ZENOTME commented 1 month ago

cc @liurenjie1024 @Xuanwo @Fokko @marvinlanhenke