Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf6c5e52

Browse files
committed
cleanup
1 parentb323f4d commitf6c5e52

File tree

1 file changed

+0
-62
lines changed

1 file changed

+0
-62
lines changed

‎src/pg_pathman.c

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ static void disable_inheritance_subselect(Query *parse);
7272
staticbooldisable_inheritance_subselect_walker(Node*node,void*context);
7373

7474
/* Expression tree handlers */
75-
staticDatumincrease_hashable_value(constPartRelationInfo*prel,Datumvalue);
76-
staticDatumdecrease_hashable_value(constPartRelationInfo*prel,Datumvalue);
7775
staticvoidhandle_binary_opexpr(WalkerContext*context,WrapperNode*result,constNode*varnode,constConst*c);
7876
staticvoidhandle_binary_opexpr_param(constPartRelationInfo*prel,WrapperNode*result,constNode*varnode);
7977
staticWrapperNode*handle_opexpr(constOpExpr*expr,WalkerContext*context);
@@ -805,38 +803,6 @@ finish_least_greatest(WrapperNode *wrap, WalkerContext *context)
805803
context->hasGreatest= false;
806804
}
807805

808-
/*
809-
* Increase value of hash partitioned column.
810-
*/
811-
staticDatum
812-
increase_hashable_value(constPartRelationInfo*prel,Datumvalue)
813-
{
814-
switch (prel->atttype)
815-
{
816-
caseINT4OID:
817-
returnInt32GetDatum(DatumGetInt32(value)+1);
818-
default:
819-
elog(ERROR,"Invalid datatype: %u",prel->atttype);
820-
return (Datum)0;
821-
}
822-
}
823-
824-
/*
825-
* Decrease value of hash partitioned column.
826-
*/
827-
staticDatum
828-
decrease_hashable_value(constPartRelationInfo*prel,Datumvalue)
829-
{
830-
switch (prel->atttype)
831-
{
832-
caseINT4OID:
833-
returnInt32GetDatum(DatumGetInt32(value)-1);
834-
default:
835-
elog(ERROR,"Invalid datatype: %u",prel->atttype);
836-
return (Datum)0;
837-
}
838-
}
839-
840806
/*
841807
*This function determines which partitions should appear in query plan
842808
*/
@@ -879,34 +845,6 @@ handle_binary_opexpr(WalkerContext *context, WrapperNode *result,
879845
switch (prel->parttype)
880846
{
881847
casePT_HASH:
882-
// value = OidFunctionCall1(prel->hash_proc, c->constvalue);
883-
// if (strategy == BTLessStrategyNumber ||
884-
// strategy == BTLessEqualStrategyNumber)
885-
// {
886-
// // Datum value = c->constvalue;
887-
888-
// if (strategy == BTLessStrategyNumber)
889-
// value = decrease_hashable_value(prel, value);
890-
// if (!context->hasGreatest || DatumGetInt32(FunctionCall2(&cmp_func, value, context->greatest)) < 0)
891-
// {
892-
// context->greatest = value;
893-
// context->hasGreatest = true;
894-
// }
895-
// }
896-
// else if (strategy == BTGreaterStrategyNumber ||
897-
// strategy == BTGreaterEqualStrategyNumber)
898-
// {
899-
// // Datum value = c->constvalue;
900-
901-
// if (strategy == BTGreaterStrategyNumber)
902-
// value = increase_hashable_value(prel, value);
903-
// if (!context->hasLeast || DatumGetInt32(FunctionCall2(&cmp_func, value, context->least)) > 0)
904-
// {
905-
// context->least = value;
906-
// context->hasLeast = true;
907-
// }
908-
// }
909-
// else
910848
if (strategy==BTEqualStrategyNumber)
911849
{
912850
value=OidFunctionCall1(prel->hash_proc,c->constvalue);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp