Skip to content

Commit bf93b99

Browse files
committed
Remove unused code
1 parent 44c3e0d commit bf93b99

File tree

2 files changed

+0
-41
lines changed

2 files changed

+0
-41
lines changed

src/partition_filter.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -529,44 +529,6 @@ partition_filter_create_scan_state(CustomScan *node)
529529
return (Node *) state;
530530
}
531531

532-
struct expr_walker_context
533-
{
534-
const PartRelationInfo *prel;
535-
TupleTableSlot *slot;
536-
HeapTuple tup;
537-
};
538-
539-
/* Fills CustomConst nodes with values from slot */
540-
static bool
541-
adapt_values (Node *node, struct expr_walker_context *context)
542-
{
543-
if (node == NULL)
544-
return false;
545-
546-
/* location == -2 means that it's our CustomConst node */
547-
if (IsA(node, Const) && ((Const *)node)->location == -2)
548-
{
549-
AttrNumber attnum;
550-
Const *cst;
551-
bool isNull;
552-
553-
cst = (Const *)node;
554-
555-
attnum = ((CustomConst *)node)->varattno;
556-
Assert(attnum != InvalidAttrNumber);
557-
558-
/* check that type is still same */
559-
Assert(context->slot->tts_tupleDescriptor->
560-
attrs[attnum - 1]->atttypid == cst->consttype);
561-
cst->constvalue = heap_getattr(context->tup, attnum,
562-
context->slot->tts_tupleDescriptor, &isNull);
563-
cst->constisnull = isNull;
564-
return false;
565-
}
566-
567-
return expression_tree_walker(node, adapt_values, (void *) context);
568-
}
569-
570532
void
571533
partition_filter_begin(CustomScanState *node, EState *estate, int eflags)
572534
{

src/pg_pathman.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -907,9 +907,6 @@ handle_arrexpr(const ScalarArrayOpExpr *expr, WalkerContext *context)
907907
if (!match_expr_to_operand(context->prel_expr, exprnode))
908908
goto handle_arrexpr_return;
909909

910-
if (exprnode && IsA(exprnode, RelabelType))
911-
exprnode = (Node *) ((RelabelType *) exprnode)->arg;
912-
913910
if (arraynode && IsA(arraynode, Const) &&
914911
!((Const *) arraynode)->constisnull)
915912
{

0 commit comments

Comments
 (0)