Skip to content

Commit

Permalink
Scan all rows of each row group, fixes #32
Browse files Browse the repository at this point in the history
  • Loading branch information
brunchboy committed Jun 9, 2024
1 parent 5e2ed34 commit a34f75d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ This change log follows the conventions of

## [Unreleased][unreleased]

Nothing so far.
### Fixed

- An error in interpreting a value in the database export file format could lead to some rows that were actually present in tables not being found. Thanks to [@IvanOnishchenko](https://github.com/IvanOnishchenko) for [pointing this out](https://github.com/Deep-Symmetry/crate-digger/issues/32).

## [0.2.0] - 2024-05-04

Expand Down
3 changes: 3 additions & 0 deletions doc/modules/ROOT/pages/exports.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ playlist entries) have a lot of very small rows, too many to count
with a single byte. But then why not just always use
__num_rows_large__?

NOTE: The row counter entries represent the number of actually-present rows in the page. To find them, you need to scan all 16 entries of each of the row groups present in the page, ignoring any whose <<#row-presence-bits,row presence bit>> is zero.

The purpose of the next two bytes are is also unclear. Of _u~3~_ Mr.
Flesniak said “a bitmask (first track: 32)”, and he described _u~4~_
as “often 0, sometimes larger, especially for pages with a high number
Expand Down Expand Up @@ -296,6 +298,7 @@ deleted). The number of row index entries is determined, as described
above, by the value of either __num_rows_small__ or
__num_rows_large__.

[#row-presence-bits]
The bit mask for the first group of up to sixteen rows, labeled
_row~pf0~_ in the diagram (meaning “row presence flags group 0”), is
found near the end of the page. The last two bytes after each row
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.deepsymmetry</groupId>
<artifactId>crate-digger</artifactId>
<version>0.2.0</version>
<version>0.2.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Crate Digger</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/kaitai/rekordbox_pdb.ksy
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ types:
rows:
type: row_ref(_index)
repeat: expr
repeat-expr: '(group_index < (_parent.num_row_groups - 1)) ? 16 : ((_parent.num_rows - 1) % 16 + 1)'
repeat-expr: 16
doc: |
The row offsets in this group.
Expand Down

0 comments on commit a34f75d

Please sign in to comment.