Skip to content

Commit 2bc5a3d

Browse files
committed
Fix compiler warnings
Signed-off-by: Marco Slot <marco.slot@snowflake.com>
1 parent bd272eb commit 2bc5a3d

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

pg_lake_engine/src/data_file/data_file_stats.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636

3737
static void ParseDuckdbColumnMinMaxFromText(char *input, List **names, List **mins, List **maxs);
3838
static void ExtractMinMaxForAllColumns(Datum returnStatsMap, List **names, List **mins, List **maxs);
39-
static void ExtractMinMaxForColumn(Datum map, const char *colName, List **names, List **mins, List **maxs);
40-
static const char *UnescapeDoubleQuotes(const char *s);
39+
static void ExtractMinMaxForColumn(Datum map, char *colName, List **names, List **mins, List **maxs);
40+
static char *UnescapeDoubleQuotes(char *s);
4141
static List *GetDataFileColumnStatsList(List *names, List *mins, List *maxs, List *leafFields, DataFileSchema * schema);
4242
static int FindIndexInStringList(List *names, const char *targetName);
4343
static List *FetchRowGroupStats(PGDuckConnection * pgDuckConn, List *fieldIdList, char *path);
@@ -220,7 +220,7 @@ GetDataFileStatsListFromPGResult(PGresult *result, List *leafFields, DataFileSch
220220
* of type map(varchar,varchar).
221221
*/
222222
static void
223-
ExtractMinMaxForColumn(Datum map, const char *colName, List **names, List **mins, List **maxs)
223+
ExtractMinMaxForColumn(Datum map, char *colName, List **names, List **mins, List **maxs)
224224
{
225225
ArrayType *elementsArray = DatumGetArrayTypeP(map);
226226

@@ -284,8 +284,8 @@ ExtractMinMaxForColumn(Datum map, const char *colName, List **names, List **mins
284284
* UnescapeDoubleQuotes unescapes any doubled quotes.
285285
* e.g. "ab\"\"cd\"\"ee" becomes "ab\"cd\"ee"
286286
*/
287-
static const char *
288-
UnescapeDoubleQuotes(const char *s)
287+
static char *
288+
UnescapeDoubleQuotes(char *s)
289289
{
290290
if (s == NULL)
291291
return NULL;
@@ -365,7 +365,7 @@ ExtractMinMaxForAllColumns(Datum returnStatsMap, List **names, List **mins, List
365365
* pg_map text key is escaped for double quotes. We need to unescape
366366
* them.
367367
*/
368-
const char *unescapedColName = UnescapeDoubleQuotes(colName);
368+
char *unescapedColName = UnescapeDoubleQuotes(colName);
369369

370370
ExtractMinMaxForColumn(colStatsDatum, unescapedColName, names, mins, maxs);
371371
}

pg_lake_iceberg/src/rest_catalog/rest_catalog.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
* limitations under the License.
1616
*/
1717

18+
#include <inttypes.h>
19+
1820
#include "postgres.h"
1921
#include "miscadmin.h"
2022

21-
#include <inttypes.h>
22-
2323
#include "common/base64.h"
2424
#include "commands/dbcommands.h"
2525
#include "foreign/foreign.h"
@@ -882,7 +882,7 @@ GetAddSnapshotCatalogRequest(IcebergSnapshot * newSnapshot, Oid relationId)
882882
appendStringInfo(body, ",\"schema-id\":%d", newSnapshot->schema_id);
883883
appendStringInfoString(body, "}}, "); /* end add-snapshot */
884884

885-
appendStringInfo(body, "{\"action\":\"set-snapshot-ref\", \"type\":\"branch\", \"ref-name\":\"main\", \"snapshot-id\":%lld}", newSnapshot->snapshot_id);
885+
appendStringInfo(body, "{\"action\":\"set-snapshot-ref\", \"type\":\"branch\", \"ref-name\":\"main\", \"snapshot-id\":" INT64_FORMAT "}", newSnapshot->snapshot_id);
886886

887887
RestCatalogRequest *request = palloc0(sizeof(RestCatalogRequest));
888888

0 commit comments

Comments
 (0)