You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by "MisterRaindrop (via GitHub)" <gi...@apache.org> on 2026/03/03 05:48:44 UTC
Re: [PR] feat: pxf fdw support parallel scan [cloudberry-pxf]
MisterRaindrop commented on code in PR #61:
URL: https://github.com/apache/cloudberry-pxf/pull/61#discussion_r2876221867
##########
fdw/pxf_bridge.h:
##########
@@ -30,10 +30,35 @@
#include "nodes/execnodes.h"
#include "nodes/parsenodes.h"
#include "nodes/pg_list.h"
+#include "storage/spin.h"
#define PXF_SEGMENT_ID GpIdentity.segindex
#define PXF_SEGMENT_COUNT getgpsegmentCount()
+/*
+ * Fragment metadata for parallel execution.
+ * Stored in local memory, not in shared memory.
+ */
+typedef struct PxfFragmentData
+{
+ char *source_name; /* fragment source name (e.g. file path) */
+ int index; /* fragment index */
+ char *metadata; /* fragment metadata (base64 encoded) */
+ char *profile; /* optional profile override */
+} PxfFragmentData;
+
+/*
+ * Shared state for parallel foreign scan.
+ * This structure is stored in DSM (dynamic shared memory).
+ */
+typedef struct PxfParallelScanState
+{
+ slock_t mutex; /* mutex for accessing shared state */
+ int total_fragments; /* total number of fragments */
+ int next_fragment; /* next fragment index to be assigned */
+ bool finished; /* true if all fragments have been processed */
Review Comment:
code is refact
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org