MCPcopy Create free account
hub / github.com/apache/cloudberry / readIntCols

Function readIntCols

src/backend/nodes/readfuncs.c:3575–3594  ·  view source on GitHub ↗

* readIntCols */

Source from the content-addressed store, hash-verified

3573 * readIntCols
3574 */
3575int *
3576readIntCols(int numCols)
3577{
3578 int tokenLength,
3579 i;
3580 const char *token;
3581 int *int_vals;
3582
3583 if (numCols <= 0)
3584 return NULL;
3585
3586 int_vals = (int *) palloc(numCols * sizeof(int));
3587 for (i = 0; i < numCols; i++)
3588 {
3589 token = pg_strtok(&tokenLength);
3590 int_vals[i] = atoi(token);
3591 }
3592
3593 return int_vals;
3594}
3595
3596/*
3597 * readBoolCols

Callers 1

readfuncs.cFile · 0.85

Calls 2

pg_strtokFunction · 0.85
pallocFunction · 0.50

Tested by

no test coverage detected