The required infrastructure to distribute SampleScan to the remote node was
missing. Also, necessary _read function was missing to convert a string
representation of SampleScan node to its binary equivalent. This patch adds all
of that
READ_DONE();
}
+/*
+ * _readSampleScan
+ */
+static SampleScan *
+_readSampleScan(void)
+{
+ READ_SCAN_FIELDS(SampleScan);
+
+ READ_DONE();
+}
/*
* _readIndexScan
return_value = _readScan();
else if (MATCH("SEQSCAN", 7))
return_value = _readSeqScan();
+ else if (MATCH("SAMPLESCAN", 10))
+ return_value = _readSampleScan();
else if (MATCH("INDEXSCAN", 9))
return_value = _readIndexScan();
else if (MATCH("INDEXONLYSCAN", 13))
required_outer);
pathnode->pathkeys = NIL; /* samplescan has unordered result */
+#ifdef XCP
+ set_scanpath_distribution(root, rel, pathnode);
+ if (rel->baserestrictinfo)
+ {
+ ListCell *lc;
+ foreach (lc, rel->baserestrictinfo)
+ {
+ RestrictInfo *ri = (RestrictInfo *) lfirst(lc);
+ restrict_distribution(root, ri, pathnode);
+ }
+ }
+#endif
+
cost_samplescan(pathnode, root, rel);
return pathnode;