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

Function getFormatStr

gpcontrib/gpcloud/src/gpcloud.cpp:113–121  ·  view source on GitHub ↗

* Detect data format * used to set file extension on S3 in gpwriter. */

Source from the content-addressed store, hash-verified

111 * used to set file extension on S3 in gpwriter.
112 */
113static const char *getFormatStr(FunctionCallInfo fcinfo) {
114 Relation rel = EXTPROTOCOL_GET_RELATION(fcinfo);
115 ExtTableEntry *exttbl = GetExtTableEntry(rel->rd_id);
116 char fmtcode = exttbl->fmtcode;
117
118 if (fmttype_is_text(fmtcode)) return "txt";
119 if (fmttype_is_csv(fmtcode)) return "csv";
120 return S3_DEFAULT_FORMAT;
121}
122
123bool hasHeader = false;
124

Callers 1

s3_exportFunction · 0.85

Calls 1

GetExtTableEntryFunction · 0.85

Tested by

no test coverage detected