jermp / pthash

Fast and compact minimal perfect hash functions in C++.
MIT License
179 stars 25 forks source link

runtime error "blank line detected after reading X non-empty lines" #17

Closed zacchiro closed 7 months ago

zacchiro commented 7 months ago

I'm getting the following runtime error with the main build executable:

 == partitioned 0% keysterminate called after throwing an instance of 'std::runtime_error'
  what():  blank line detected after reading 0 non-empty lines

This is a real dataset where there is indeed a valid key which happens to be the empty string.

Is there any particular reason for barfing on empty string? I've used other MPHs (specifically: GOV) on this dataset in the past and I don't see why it shouldn't be possible to use PTHash.

Thanks in advance, Cheers

jermp commented 7 months ago

Hi @zacchiro, should be fixed as of https://github.com/jermp/pthash/commit/1a22944cb369e15fc24ad71e3e2f081f7d498431. Can you please, confirm?

Thank, -Giulio

zacchiro commented 7 months ago

On Mon, Nov 27, 2023 at 11:13:23AM -0800, Giulio Ermanno Pibiri wrote:

should be fixed as of https://github.com/jermp/pthash/commit/1a22944cb369e15fc24ad71e3e2f081f7d498431. Can you please, confirm?

Confirmed, it gets past that empty string now. Thanks!