Skip to content

Commit

Permalink
fix: more efficient ndjson emptiness check (#481)
Browse files Browse the repository at this point in the history
  • Loading branch information
Taepper authored Jun 14, 2024
1 parent 6dbe251 commit 344ec7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/silo/preprocessing/metadata_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ bool MetadataInfo::isNdjsonFileEmpty(const std::filesystem::path& ndjson_file) {

auto result = connection.Query(fmt::format(
"SELECT COUNT(*) "
"FROM read_json_auto(\"{}\");",
"FROM (SELECT * FROM read_json_auto(\"{}\") LIMIT 1);",
ndjson_file.string()
));

Expand Down

0 comments on commit 344ec7b

Please sign in to comment.