Skip to content

Commit

Permalink
[FLINK-33546] Implement type inference for order(asc/desc) function
Browse files Browse the repository at this point in the history
This closes apache#23733
  • Loading branch information
dawidwys committed Nov 16, 2023
1 parent 6101b67 commit 54906fe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2005,14 +2005,16 @@ ANY, and(logical(LogicalTypeRoot.BOOLEAN), LITERAL)
BuiltInFunctionDefinition.newBuilder()
.name("asc")
.kind(OTHER)
.outputTypeStrategy(TypeStrategies.MISSING)
.inputTypeStrategy(sequence(ANY))
.outputTypeStrategy(argument(0))
.build();

public static final BuiltInFunctionDefinition ORDER_DESC =
BuiltInFunctionDefinition.newBuilder()
.name("desc")
.kind(OTHER)
.outputTypeStrategy(TypeStrategies.MISSING)
.inputTypeStrategy(sequence(ANY))
.outputTypeStrategy(argument(0))
.build();

// --------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,6 @@ class PlannerExpressionConverter private extends ApiExpressionVisitor[PlannerExp
case fd: FunctionDefinition =>
fd match {

case ORDER_ASC =>
assert(args.size == 1)
Asc(args.head)

case ORDER_DESC =>
assert(args.size == 1)
Desc(args.head)

case OVER =>
assert(args.size >= 4)
OverCall(
Expand Down

This file was deleted.

0 comments on commit 54906fe

Please sign in to comment.