Skip to content

Commit dee49a7

Browse files
committed
Added a tiledb_vcf_writer_set_skip_aggregate_stats hook to the C API
This allows the Writer's skip_aggregate_stats ingestion parameter to be set via the C API.
1 parent b347c45 commit dee49a7

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

libtiledbvcf/src/c_api/tiledbvcf.cc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1573,6 +1573,19 @@ int32_t tiledb_vcf_writer_set_verbose(
15731573
return TILEDB_VCF_OK;
15741574
}
15751575

1576+
int32_t tiledb_vcf_writer_set_skip_aggregate_stats(
1577+
tiledb_vcf_writer_t* writer, const bool skip_aggregate_stats) {
1578+
if (sanity_check(writer) == TILEDB_VCF_ERR)
1579+
return TILEDB_VCF_ERR;
1580+
1581+
if (SAVE_ERROR_CATCH(
1582+
writer,
1583+
writer->writer_->set_skip_aggregate_stats(skip_aggregate_stats)))
1584+
return TILEDB_VCF_ERR;
1585+
1586+
return TILEDB_VCF_OK;
1587+
}
1588+
15761589
int32_t tiledb_vcf_writer_set_tiledb_stats_enabled(
15771590
tiledb_vcf_writer_t* writer, const bool stats_enabled) {
15781591
if (sanity_check(writer) == TILEDB_VCF_ERR)

libtiledbvcf/src/c_api/tiledbvcf.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,6 +1500,16 @@ TILEDBVCF_EXPORT int32_t tiledb_vcf_writer_set_max_num_records(
15001500
TILEDBVCF_EXPORT int32_t
15011501
tiledb_vcf_writer_set_verbose(tiledb_vcf_writer_t* writer, bool verbose);
15021502

1503+
/**
1504+
* Set whether to skip aggregate stats updates during deletion.
1505+
*
1506+
* @param writer VCF writer object
1507+
* @param skip_aggregate_stats whether to skip aggregate stats
1508+
* @return `TILEDB_VCF_OK` for success or `TILEDB_VCF_ERR` for error.
1509+
*/
1510+
TILEDBVCF_EXPORT int32_t tiledb_vcf_writer_set_skip_aggregate_stats(
1511+
tiledb_vcf_writer_t* writer, bool skip_aggregate_stats);
1512+
15031513
/**
15041514
* Sets whether TileDB internal statistics should be enabled or not.
15051515
*

0 commit comments

Comments
 (0)