forked from duckdb/duckdb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f27eb28
commit eb2a5e8
Showing
19 changed files
with
197 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
add_subdirectory(distributive) | ||
|
||
add_library_unity(duckdb_func_aggr OBJECT distributive_functions.cpp | ||
sorted_aggregate_function.cpp) | ||
add_library_unity(duckdb_func_aggr OBJECT sorted_aggregate_function.cpp) | ||
set(ALL_OBJECT_FILES | ||
${ALL_OBJECT_FILES} $<TARGET_OBJECTS:duckdb_func_aggr> | ||
PARENT_SCOPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
add_library_unity(duckdb_aggr_distr OBJECT count.cpp first.cpp minmax.cpp) | ||
add_library_unity(duckdb_aggr_distr OBJECT count.cpp first_last_any.cpp | ||
minmax.cpp) | ||
set(ALL_OBJECT_FILES | ||
${ALL_OBJECT_FILES} $<TARGET_OBJECTS:duckdb_aggr_distr> | ||
PARENT_SCOPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
[ | ||
{ | ||
"name": "count_star", | ||
"parameters": "", | ||
"description": "", | ||
"example": "", | ||
"type": "aggregate_function" | ||
}, | ||
{ | ||
"name": "count", | ||
"parameters": "arg", | ||
"description": "Returns the number of non-null values in arg.", | ||
"example": "count(A)", | ||
"type": "aggregate_function_set" | ||
}, | ||
{ | ||
"name": "first", | ||
"parameters": "arg", | ||
"description": "Returns the first value (null or non-null) from arg. This function is affected by ordering.", | ||
"example": "first(A)", | ||
"type": "aggregate_function_set", | ||
"aliases": ["arbitrary"] | ||
}, | ||
{ | ||
"name": "last", | ||
"parameters": "arg", | ||
"description": "Returns the last value of a column. This function is affected by ordering.", | ||
"example": "last(A)", | ||
"type": "aggregate_function_set" | ||
}, | ||
{ | ||
"name": "any_value", | ||
"parameters": "arg", | ||
"description": "Returns the first non-null value from arg. This function is affected by ordering.", | ||
"example": "", | ||
"type": "aggregate_function_set" | ||
}, | ||
{ | ||
"name": "min", | ||
"parameters": "arg", | ||
"description": "Returns the minimum value present in arg.", | ||
"example": "min(A)", | ||
"type": "aggregate_function_set" | ||
}, | ||
{ | ||
"name": "max", | ||
"parameters": "arg", | ||
"description": "Returns the maximum value present in arg.", | ||
"example": "max(A)", | ||
"type": "aggregate_function_set" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/include/duckdb/function/aggregate/distributive_function_utils.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//===----------------------------------------------------------------------===// | ||
// DuckDB | ||
// | ||
// duckdb/function/aggregate/distributive_functions.hpp | ||
// | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#pragma once | ||
|
||
#include "duckdb/function/function_set.hpp" | ||
|
||
namespace duckdb { | ||
|
||
struct CountFunctionBase { | ||
static AggregateFunction GetFunction(); | ||
}; | ||
|
||
struct FirstFunctionGetter { | ||
static AggregateFunction GetFunction(const LogicalType &type); | ||
}; | ||
|
||
struct MinFunction { | ||
static AggregateFunction GetFunction(); | ||
}; | ||
|
||
struct MaxFunction { | ||
static AggregateFunction GetFunction(); | ||
}; | ||
|
||
} // namespace duckdb |
Oops, something went wrong.