Skip to content

Commit

Permalink
cast
Browse files Browse the repository at this point in the history
  • Loading branch information
chenhao-db committed Apr 9, 2024
1 parent 8ca973e commit 86f4057
Show file tree
Hide file tree
Showing 5 changed files with 396 additions and 139 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
* define a new class to avoid depending on or modifying Spark.
*/
public final class Variant {
private final byte[] value;
private final byte[] metadata;
final byte[] value;
final byte[] metadata;
// The variant value doesn't use the whole `value` binary, but starts from its `pos` index and
// spans a size of `valueSize(value, pos)`. This design avoids frequent copies of the value binary
// when reading a sub-variant in the array/object element.
private final int pos;
final int pos;

public Variant(byte[] value, byte[] metadata) {
this(value, metadata, 0);
Expand Down
Loading

0 comments on commit 86f4057

Please sign in to comment.