From 599430b2f48b7882ed8ee3743317d5fa6b6736d3 Mon Sep 17 00:00:00 2001 From: Colin Dellow Date: Tue, 20 Mar 2018 19:57:12 -0400 Subject: [PATCH] Add #ifdefs around printfs --- parquet/parquet.cc | 10 +++++++--- parquet/parquet_cursor.cc | 2 -- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/parquet/parquet.cc b/parquet/parquet.cc index 8459a0f..ee70bf8 100644 --- a/parquet/parquet.cc +++ b/parquet/parquet.cc @@ -383,9 +383,12 @@ static int parquetFilter( sqlite3_value **argv ){ ParquetCursor* cursor = ((sqlite3_vtab_cursor_parquet*)cur)->cursor; - printf("xFilter: idxNum=%d, idxStr=%lu, argc=%d\n", idxNum, (long unsigned int)idxStr, argc); sqlite3_index_info* indexInfo = (sqlite3_index_info*)idxStr; + +#ifdef DEBUG + printf("xFilter: idxNum=%d, idxStr=%lu, argc=%d\n", idxNum, (long unsigned int)idxStr, argc); debugConstraints(indexInfo, cursor->getTable(), argc, argv); +#endif std::vector constraints; int j = 0; for(int i = 0; i < indexInfo->nConstraint; i++) { @@ -447,10 +450,12 @@ static int parquetBestIndex( sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo ){ - ParquetTable* table = ((sqlite3_vtab_parquet*)tab)->table; +#ifdef DEBUG + ParquetTable* table = ((sqlite3_vtab_parquet*)tab)->table; printf("xBestIndex: nConstraint=%d, nOrderBy=%d\n", pIdxInfo->nConstraint, pIdxInfo->nOrderBy); debugConstraints(pIdxInfo, table, 0, NULL); +#endif if(pIdxInfo->nConstraint == 0) { pIdxInfo->estimatedCost = 1000000000000; @@ -466,7 +471,6 @@ static int parquetBestIndex( } } } - printf("idx %d has cost %f\n", pIdxInfo->idxNum, pIdxInfo->estimatedCost); size_t dupeSize = sizeof(sqlite3_index_info) + //pIdxInfo->nConstraint * sizeof(sqlite3_index_constraint) + diff --git a/parquet/parquet_cursor.cc b/parquet/parquet_cursor.cc index d66a992..9dc39df 100644 --- a/parquet/parquet_cursor.cc +++ b/parquet/parquet_cursor.cc @@ -70,8 +70,6 @@ bool ParquetCursor::currentRowGroupSatisfiesBlobFilter(Constraint& constraint, s throw std::invalid_argument(ss.str()); } - printf("\n\nBLOB\n\n"); - const std::vector& blob = constraint.blobValue; switch(constraint.op) {