Repository navigation
Conversation
1. cd builf && python3 ../run_clang_tidy.py -p . -fix 2. git ls-files --exclude-standard | grep ".*\(cc\|hh\)$" | xargs clang-format -i -style=file --dump-config 3. add lisence to run_clang_tidy.py and clang-tidy config file
|
This patch I`ve done the following things:
Currently the patch can be built on my macOS(arm Apple clang version 15.0.0) and ubuntu(x64 clang-18) and passes UTs with |
wgtmac
left a comment
There was a problem hiding this comment.
Thanks for the work! I've left some comments. Most are about the requests to remove m prefix. This can be a separate patch.
| int32_t mScale; // scale of decimal type | ||
| bool mIsNull; // whether this literal is null | ||
| size_t mHashCode; // precomputed hash code for the literal | ||
| LiteralVal mValue_; // data value for this literal if not null |
There was a problem hiding this comment.
Is it possible to remove the m prefix?
|
|
||
| private: | ||
| std::vector<uint64_t> mData; | ||
| std::vector<uint64_t> mData_; |
There was a problem hiding this comment.
ditto, would be good to remove m prefix here and below.
| std::vector<TreeNode> mChildren; | ||
| size_t mLeaf; | ||
| TruthValue mConstant; | ||
| Operator mOperator_; |
| uint64_t mColumnId; | ||
| std::vector<Literal> mLiterals; | ||
| size_t mHashCode; | ||
| Operator mOperator_; |
| const SchemaEvolution* mSchemaEvolution; | ||
| uint64_t mRowIndexStride; | ||
| WriterVersion mWriterVersion; | ||
| const Type& mType_; |
| private: | ||
| std::shared_ptr<ExpressionTree> mExpressionTree; | ||
| std::vector<PredicateLeaf> mLeaves; | ||
| std::shared_ptr<ExpressionTree> mExpressionTree_; |
| sys.exit(return_code) | ||
|
|
||
| if __name__ == '__main__': | ||
| main() No newline at end of file |
There was a problem hiding this comment.
Is it possible to run this in the CI?
There was a problem hiding this comment.
Is it possible to run this in the CI?
Absolutely. We can leverage clang-tidy/tool/clang-tidy-diff.py
There was a problem hiding this comment.
Perhaps we can leverage Github Action like https://github.com/marketplace/actions/c-c-linter or similar actions from here: https://github.com/marketplace?category=&type=actions&verification=&query=sort%3Apopularity-desc+clang-tidy
I have added two actions in the past:
- apache/skywalking-eyes@main for license header check
ORC-1395: Enforce license check via github action #1442 - jidicula/clang-format-action@v4.9.0 for clang-format check
ORC-1307: Add.clang-formatto enforce C++ code style #1308
It seems that we can use a single linter action to run both clang-tidy and clang-format.
| explicit NotImplementedYet(const std::string& what_arg); | ||
| explicit NotImplementedYet(const char* what_arg); | ||
| explicit NotImplementedYet(const std::string& whatArg); | ||
| explicit NotImplementedYet(const char* whatArg); |
There was a problem hiding this comment.
Do we consider using snake case instead of mixed case (camel case) for variable names? Impala C++ Code follows a modified version of the Google C++ Style Guide at:
https://google.github.io/styleguide/cppguide.html#Variable_Names
I think either way is ok. Just remembered that when I first read the ORC C++ code, they look like Java code. :)
There was a problem hiding this comment.
There are lots of public/protected variables using camel case, if we change them into snake case, the library codes would be not backwards compatible. Backwards compatibility is important, I think.
There was a problem hiding this comment.
+1 for keeping the compatibility.
There was a problem hiding this comment.
I see. That makes sense to me.
|
@dongjoon-hyun Hi, do you have any suggestions about this patch? |
Although I've been monitoring this PR and discussion, there is no other objection for the AS-IS direction including backward compatibility consideration. |
wgtmac
left a comment
There was a problem hiding this comment.
I'm fine to merge this PR as is. We can add follow-ups to address remaining issues as this one is already very large.
|
Thank you! |
What changes were proposed in this pull request?
Why are the changes needed?
To close #1845
How was this patch tested?
UT passed
Was this patch authored or co-authored using generative AI tooling?
NO