ostinru commented on code in PR #61:
URL: https://github.com/apache/cloudberry-pxf/pull/61#discussion_r2795154622
##########
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:
> true if all fragments have been processed... or cancelled?
And. What is a purpose of write-only variable?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]