Skip to content

ORC-1376: [C++] Scaffolding of schema evolution - #1427

Merged
coderex2522 merged 5 commits into
apache:mainfrom
ffacs:main
Mar 14, 2023
Merged

coderex2522 merged 5 commits into
apache:mainfrom
ffacs:main

Conversation

@ffacs

@ffacs ffacs commented Mar 3, 2023

Copy link
Copy Markdown
Contributor

Add schema evolution and check PPD security

What changes were proposed in this pull request?

This pr adds a class schema evolution which checks validity and PDD security of a type conversion. The convertions would be finished later.

Why are the changes needed?

To support schema evolution in c++

How was this patch tested?

UT

@github-actions github-actions Bot added the CPP label Mar 3, 2023
@wgtmac

wgtmac commented Mar 3, 2023

Copy link
Copy Markdown
Member

Thanks @ffacs for contribution! I will take a look next week.

cc @stiga-huang @coderex2522

@wgtmac wgtmac changed the title ORC-1376: [C++] Support schema evolution ORC-1376: [C++] Scaffolding of schema evolution Mar 7, 2023

@wgtmac wgtmac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good. I have left some minor comments.

As this is the 1st patch of a large feature. I expect there are more patches coming. Could you please open a separate JIRA for each followup work item?

Comment thread c++/include/orc/Type.hh Resolved
Comment thread c++/include/orc/Type.hh Resolved
Comment thread c++/src/SchemaEvolution.cc Resolved
Comment thread c++/src/SchemaEvolution.cc Resolved
Add schema evolution and check PPD security
@ffacs

ffacs commented Mar 8, 2023

Copy link
Copy Markdown
Contributor Author

I`ve uploaded a new patch, please take a look. @wgtmac @coderex2522 @stiga-huang

@wgtmac wgtmac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to add more commits instead of a forced push. This makes it harder to find what changes are made compared to previous commits.

Overall looks good to me.

Comment thread c++/include/orc/Type.hh Outdated
virtual std::vector<std::string> getAttributeKeys() const = 0;
virtual std::string getAttributeValue(const std::string& key) const = 0;
virtual std::string toString() const = 0;
virtual std::optional<const Type*> getTypeByColumnId(uint64_t colId) const = 0;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn’t notice that this is a public header. As Apache impala is still on c++14 and ‘optional’ is a c++17 feature, it will break impala. Could you revert this and add a comment for the possible nullptr of return? Sorry about that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@ffacs
ffacs requested a review from wgtmac March 8, 2023 13:10

@dongjoon-hyun dongjoon-hyun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making a PR, @ffacs .

This PR seems to introduce a breaking change to SargsApplier::SargsApplier constructor. Could you provide a backward compatibility?

@dongjoon-hyun dongjoon-hyun added this to the 1.9.0 milestone Mar 8, 2023

@wgtmac wgtmac left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @ffacs!

@ffacs
ffacs requested a review from dongjoon-hyun March 11, 2023 15:45

@coderex2522 coderex2522 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ffacs! And I've left some formatting comments.

Comment thread c++/src/SchemaEvolution.cc Outdated
#include "SchemaEvolution.hh"
#include "orc/Exceptions.hh"

#include <unordered_map>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two header files are already included in the SchemaEvolution.hh. It is a redundant code.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

donwe

Comment thread c++/src/SchemaEvolution.hh Outdated

#include <unordered_map>
#include <unordered_set>
#include "orc/Type.hh"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is recommended that this line ' #include "orc/Type.hh" ' be moved to precede line ' #include <unordered_map>'.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@coderex2522

Copy link
Copy Markdown
Contributor

+1, LGTM.

@coderex2522
coderex2522 merged commit 011bf28 into apache:main Mar 14, 2023
@dongjoon-hyun

Copy link
Copy Markdown
Member

Thank you all!

dongjoon-hyun pushed a commit that referenced this pull request Mar 16, 2023
### What changes were proposed in this pull request?
Add a Gitbub action to enforce license check of c++ source files.

### Why are the changes needed?
#1427 was accidentally merged without license headers added to new files. We need a tool to automatically check it before merging.

### How was this patch tested?
Make sure the new action works as expected.

Closes #1442 from wgtmac/license.

Authored-by: Gang Wu <ustcwg@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
wgtmac added a commit to wgtmac/orc that referenced this pull request Mar 16, 2023
Add a Gitbub action to enforce license check of c++ source files.

apache#1427 was accidentally merged without license headers added to new files. We need a tool to automatically check it before merging.

Make sure the new action works as expected.

Closes apache#1442 from wgtmac/license.

Authored-by: Gang Wu <ustcwg@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
wgtmac added a commit to wgtmac/orc that referenced this pull request Mar 16, 2023
Add a Gitbub action to enforce license check of c++ source files.

apache#1427 was accidentally merged without license headers added to new files. We need a tool to automatically check it before merging.

Make sure the new action works as expected.

Closes apache#1442 from wgtmac/license.

Authored-by: Gang Wu <ustcwg@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
guiyanakuang pushed a commit that referenced this pull request Mar 16, 2023
Add a Gitbub action to enforce license check of c++ source files.

#1427 was accidentally merged without license headers added to new files. We need a tool to automatically check it before merging.

Make sure the new action works as expected.

Closes #1442 from wgtmac/license.

Authored-by: Gang Wu <ustcwg@gmail.com>

Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
wgtmac added a commit to wgtmac/orc that referenced this pull request Mar 16, 2023
Add a Gitbub action to enforce license check of c++ source files.

apache#1427 was accidentally merged without license headers added to new files. We need a tool to automatically check it before merging.

Make sure the new action works as expected.

Closes apache#1442 from wgtmac/license.

Authored-by: Gang Wu <ustcwg@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
wgtmac added a commit to wgtmac/orc that referenced this pull request Mar 16, 2023
Add a Gitbub action to enforce license check of c++ source files.

apache#1427 was accidentally merged without license headers added to new files. We need a tool to automatically check it before merging.

Make sure the new action works as expected.

Closes apache#1442 from wgtmac/license.

Authored-by: Gang Wu <ustcwg@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
wgtmac added a commit that referenced this pull request Mar 16, 2023
Add a Gitbub action to enforce license check of c++ source files.

#1427 was accidentally merged without license headers added to new files. We need a tool to automatically check it before merging.

Make sure the new action works as expected.

Closes #1442 from wgtmac/license.

Authored-by: Gang Wu <ustcwg@gmail.com>

Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
@dongjoon-hyun

Copy link
Copy Markdown
Member

Is the JIRA ID correct?

@wgtmac

wgtmac commented Jun 29, 2023

Copy link
Copy Markdown
Member

Is the JIRA ID correct?

It seems that there isn't any JIRA for this subtask.

cxzl25 pushed a commit to cxzl25/orc that referenced this pull request Jan 11, 2024
### What changes were proposed in this pull request?
This pr adds a class schema evolution which checks validity and PDD security of a type conversion. The convertions would be finished later.

### Why are the changes needed?
To support schema evolution in c++

### How was this patch tested?
UT

This closes apache#1427 

Co-authored-by: wuyuanping <wuyuanping.wyp@alibaba-inc.com>
Co-authored-by: ffacs <ffacs520@gmail.com>
cxzl25 pushed a commit to cxzl25/orc that referenced this pull request Jan 11, 2024
### What changes were proposed in this pull request?
Add a Gitbub action to enforce license check of c++ source files.

### Why are the changes needed?
apache#1427 was accidentally merged without license headers added to new files. We need a tool to automatically check it before merging.

### How was this patch tested?
Make sure the new action works as expected.

Closes apache#1442 from wgtmac/license.

Authored-by: Gang Wu <ustcwg@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants