-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from chaojun-zhang/main_backup
Initial commit of substrait-cpp
- Loading branch information
Showing
33 changed files
with
2,725 additions
and
201 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 |
---|---|---|
@@ -0,0 +1,87 @@ | ||
--- | ||
AccessModifierOffset: -1 | ||
AlignAfterOpenBracket: AlwaysBreak | ||
AlignConsecutiveAssignments: false | ||
AlignConsecutiveDeclarations: false | ||
AlignEscapedNewlinesLeft: true | ||
AlignOperands: false | ||
AlignTrailingComments: false | ||
AllowAllParametersOfDeclarationOnNextLine: false | ||
AllowShortBlocksOnASingleLine: false | ||
AllowShortCaseLabelsOnASingleLine: false | ||
AllowShortFunctionsOnASingleLine: Empty | ||
AllowShortIfStatementsOnASingleLine: false | ||
AllowShortLoopsOnASingleLine: false | ||
AlwaysBreakAfterReturnType: None | ||
AlwaysBreakBeforeMultilineStrings: true | ||
AlwaysBreakTemplateDeclarations: true | ||
BinPackArguments: false | ||
BinPackParameters: false | ||
BraceWrapping: | ||
AfterClass: false | ||
AfterControlStatement: false | ||
AfterEnum: false | ||
AfterFunction: false | ||
AfterNamespace: false | ||
AfterObjCDeclaration: false | ||
AfterStruct: false | ||
AfterUnion: false | ||
BeforeCatch: false | ||
BeforeElse: false | ||
IndentBraces: false | ||
BreakBeforeBinaryOperators: None | ||
BreakBeforeBraces: Attach | ||
BreakBeforeTernaryOperators: true | ||
BreakConstructorInitializersBeforeComma: false | ||
BreakAfterJavaFieldAnnotations: false | ||
BreakStringLiterals: false | ||
ColumnLimit: 80 | ||
CommentPragmas: '^ IWYU pragma:' | ||
ConstructorInitializerAllOnOneLineOrOnePerLine: true | ||
ConstructorInitializerIndentWidth: 4 | ||
ContinuationIndentWidth: 4 | ||
Cpp11BracedListStyle: true | ||
DerivePointerAlignment: false | ||
DisableFormat: false | ||
ForEachMacros: [ FOR_EACH, FOR_EACH_R, FOR_EACH_RANGE, ] | ||
IncludeCategories: | ||
- Regex: '^<.*\.h(pp)?>' | ||
Priority: 1 | ||
- Regex: '^<.*' | ||
Priority: 2 | ||
- Regex: '.*' | ||
Priority: 3 | ||
IndentCaseLabels: true | ||
IndentWidth: 2 | ||
IndentWrappedFunctionNames: false | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
MacroBlockBegin: '' | ||
MacroBlockEnd: '' | ||
MaxEmptyLinesToKeep: 1 | ||
NamespaceIndentation: None | ||
ObjCBlockIndentWidth: 2 | ||
ObjCSpaceAfterProperty: false | ||
ObjCSpaceBeforeProtocolList: false | ||
PenaltyBreakBeforeFirstCallParameter: 1 | ||
PenaltyBreakComment: 300 | ||
PenaltyBreakFirstLessLess: 120 | ||
PenaltyBreakString: 1000 | ||
PenaltyExcessCharacter: 1000000 | ||
PenaltyReturnTypeOnItsOwnLine: 200 | ||
PointerAlignment: Left | ||
ReflowComments: true | ||
SortIncludes: true | ||
SpaceAfterCStyleCast: false | ||
SpaceBeforeAssignmentOperators: true | ||
SpaceBeforeParens: ControlStatements | ||
SpaceInEmptyParentheses: false | ||
SpacesBeforeTrailingComments: 1 | ||
SpacesInAngles: false | ||
SpacesInContainerLiterals: true | ||
SpacesInCStyleCastParentheses: false | ||
SpacesInParentheses: false | ||
SpacesInSquareBrackets: false | ||
Standard: Cpp11 | ||
TabWidth: 8 | ||
UseTab: Never | ||
... |
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 |
---|---|---|
|
@@ -30,3 +30,5 @@ | |
*.exe | ||
*.out | ||
*.app | ||
|
||
src/proto/substrait |
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,12 @@ | ||
[submodule "third_party/yaml-cpp"] | ||
path = third_party/yaml-cpp | ||
url = https://github.com/jbeder/yaml-cpp.git | ||
[submodule "third_party/googletest"] | ||
path = third_party/googletest | ||
url = https://github.com/google/googletest.git | ||
[submodule "third_party/substrait"] | ||
path = third_party/substrait | ||
url = https://github.com/substrait-io/substrait.git | ||
[submodule "third_party/fmt"] | ||
path = third_party/fmt | ||
url = https://github.com/fmtlib/fmt |
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,24 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.10) | ||
|
||
# set the project name | ||
project(substrait-cpp) | ||
|
||
message(STATUS "Build type: ${CMAKE_BUILD_TYPE}") | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED True) | ||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | ||
|
||
option( | ||
BUILD_TESTING | ||
"Enable substrait-cpp tests. This will enable all other build options automatically." | ||
ON) | ||
|
||
find_package(Protobuf REQUIRED) | ||
include_directories(${PROTOBUF_INCLUDE_DIRS}) | ||
|
||
add_subdirectory(third_party) | ||
include_directories(include) | ||
add_subdirectory(substrait) |
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 @@ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
.PHONY: all clean build debug release | ||
|
||
BUILD_TYPE := Release | ||
|
||
all: debug | ||
|
||
clean: | ||
@rm -rf build-* | ||
|
||
build-common: | ||
@mkdir -p build-${BUILD_TYPE} | ||
@cd build-${BUILD_TYPE} && \ | ||
cmake -Wno-dev \ | ||
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ | ||
-DPREFER_STATIC_LIBS=OFF \ | ||
$(FORCE_COLOR) \ | ||
.. | ||
|
||
build: | ||
VERBOSE=1 cmake --build build-${BUILD_TYPE} -j $${CPU_COUNT:-`nproc`} || \ | ||
cmake --build build-${BUILD_TYPE} | ||
|
||
debug: | ||
@$(MAKE) build-common BUILD_TYPE=Debug | ||
@$(MAKE) build BUILD_TYPE=Debug | ||
|
||
release: | ||
@$(MAKE) build-common BUILD_TYPE=Release | ||
@$(MAKE) build BUILD_TYPE=Release |
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,3 +1,30 @@ | ||
# substrait-cpp | ||
|
||
Planned home for CPP libraries to help build/consume Substrait query plans. | ||
|
||
## Getting Started | ||
|
||
We provide scripts to help developers setup and install substrait-cpp dependencies. | ||
|
||
### Get the substrait-cpp Source | ||
``` | ||
git clone --recursive https://github.com/substrait-io/substrait-cpp.git | ||
cd substrait-cpp | ||
# if you are updating an existing checkout | ||
git submodule sync --recursive | ||
git submodule update --init --recursive | ||
``` | ||
|
||
### Setting up on Linux (Ubuntu 20.04 or later) | ||
|
||
Once you have checked out substrait-cpp, you can setup and build like so: | ||
|
||
```shell | ||
$ ./scripts/setup-ubuntu.sh | ||
$ make | ||
``` | ||
|
||
## License | ||
|
||
substrait-cpp is licensed under the Apache 2.0 License. A copy of the license | ||
[can be found here.](https://www.apache.org/licenses/LICENSE-2.0.html) |
Oops, something went wrong.