pxf icon indicating copy to clipboard operation
pxf copied to clipboard

WIP: Changes for supporting PXF for GP7.

Open hpandeycodeit opened this issue 3 years ago • 1 comments

external-table code changes to make it compatible/working with GP7. Changes in GP7 related to header files or other code changes that are referenced in PXF code needed to be addressed/updated accordingly.

There are still some changes in the form of TODOs or FIXME that still needs to be addressed or investigated.

Major changes includes:

  • The fileam.h is no longer available in GPDB and its renamed to extaccess.h and location is changed to `gpcontrib/gp_exttable_fdw/extaccess.h'
  • ProjectionInfo struct no longer contains pi_varNumbers , pi_targetlist or pi_numSimpleVars and this is still needs to be investigated on what replaces these member variables in the new Postgres code.
  • After compiling PXF for GP7, the DATA-ENCODING param is no longer available in the Request Parameters. This is WIP as well.

Co-authored-by: Soumyadeep Chakraborty [email protected]

hpandeycodeit avatar Aug 31 '22 22:08 hpandeycodeit

@denalex This commit changed TupleDesc struct member FormData_pg_attribute attrs from pointer to non pointer. File tupdesc.h

typedef struct TupleDescData
{
	int			natts;			/* number of attributes in the tuple */
	Oid			tdtypeid;		/* composite type ID for tuple type */
	int32		tdtypmod;		/* typmod for tuple type */
	int			tdrefcount;		/* reference count, or -1 if not counting */
	TupleConstr *constr;		/* constraints, or NULL if none */
	/* attrs[N] is the description of Attribute Number N+1 */
	FormData_pg_attribute attrs[FLEXIBLE_ARRAY_MEMBER];
}			TupleDescData;
typedef struct TupleDescData *TupleDesc;

Before this commit

typedef struct tupleDesc
{
	int			natts;			/* number of attributes in the tuple */
	Form_pg_attribute *attrs;
	/* attrs[N] is a pointer to the description of Attribute Number N+1 */
	TupleConstr *constr;		/* constraints, or NULL if none */
	Oid			tdtypeid;		/* composite type ID for tuple type */
	int32		tdtypmod;		/* typmod for tuple type */
	bool		tdhasoid;		/* tuple has oid attribute in its header */
	int			tdrefcount;		/* reference count, or -1 if not counting */
}	*TupleDesc;

hpandeycodeit avatar Sep 08 '22 23:09 hpandeycodeit