-
Notifications
You must be signed in to change notification settings - Fork 442
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GLUTEN-1392][CH] Support new ExpandRel (#1432)
What changes were proposed in this pull request? support new ExpandRel introduced by #1361 (Fixes: #1392) How was this patch tested? unit tests
- Loading branch information
Showing
12 changed files
with
232 additions
and
133 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,10 @@ | |
# vscode config | ||
.vscode | ||
|
||
# vscode scala | ||
.bloop | ||
.metals | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
|
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
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,42 @@ | ||
#pragma once | ||
|
||
#include <Core/Field.h> | ||
#include <DataTypes/IDataType.h> | ||
|
||
namespace local_engine | ||
{ | ||
|
||
enum ExpandFieldKind | ||
{ | ||
EXPAND_FIELD_KIND_SELECTION, | ||
EXPAND_FIELD_KIND_LITERAL, | ||
}; | ||
|
||
class ExpandField | ||
{ | ||
public: | ||
ExpandField() = default; | ||
ExpandField( | ||
const std::vector<std::string> & names_, | ||
const std::vector<DB::DataTypePtr> & types_, | ||
const std::vector<std::vector<ExpandFieldKind>> & kinds_, | ||
const std::vector<std::vector<DB::Field>> & fields_): | ||
names(names_), types(types_), kinds(kinds_), fields(fields_) | ||
{} | ||
|
||
const std::vector<std::string> & getNames() const { return names; } | ||
const std::vector<DB::DataTypePtr> & getTypes() const { return types; } | ||
const std::vector<std::vector<ExpandFieldKind>> & getKinds() const { return kinds; } | ||
const std::vector<std::vector<DB::Field>> & getFields() const { return fields; } | ||
|
||
size_t getExpandRows() const { return kinds.size(); } | ||
size_t getExpandCols() const { return types.size(); } | ||
|
||
private: | ||
std::vector<std::string> names; | ||
std::vector<DB::DataTypePtr> types; | ||
std::vector<std::vector<ExpandFieldKind>> kinds; | ||
std::vector<std::vector<DB::Field>> fields; | ||
}; | ||
|
||
} |
Oops, something went wrong.