Skip to content

Navigation Menu

Sign in
Sign up

[C++] read encrypted ORC file - #1993

Draft
zxf216 wants to merge 4 commits into
apache:main from
zxf216:read-encrypted-orc-file
Draft

[C++] read encrypted ORC file #1993
zxf216 wants to merge 4 commits into
apache:main from
zxf216:read-encrypted-orc-file

Conversation

@zxf216

@zxf216 zxf216 commented Aug 4, 2024
edited
Loading

Copy link
Copy Markdown

What changes were proposed in this pull request?

you can use C++ version code to read encrypted ORC files
ORC file structure:links

Why are the changes needed?

The C++ version is not yet able to read encrypted ORC files now

How was this patch tested?

orc::RowReaderOptions rowReaderOptions;
orc::ReaderOptions readerOpts;
std::shared_ptr<orc::InMemoryKeystore> keyStore = std::make_shared<orc::InMemoryKeystore>();
std::string passKey ="secret123";
keyStore->addKey("pii", 0, orc::EncryptionAlgorithm::AES_CTR_128,passKey);
readerOpts.setKeyProvider(keyStore);
printContents("/root/encryption.orc",readerOpts, rowReaderOptions);

@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, @zxf216 .

We have been tracking this via

BTW, could you make the CI happy by fixing all failures?

wgtmac commented Aug 5, 2024

Copy link
Copy Markdown
Member

Thanks @zxf216! Let me take a first pass. cc @coderex2522 @ffacs

zxf216 commented Aug 6, 2024

Copy link
Copy Markdown
Author

Thank you for making a PR, @zxf216 .

We have been tracking this via

BTW, could you make the CI happy by fixing all failures?
Okay

dongjoon-hyun marked this pull request as draft August 11, 2024 18:32

Copy link
Copy Markdown
Member

I converted it to Draft because CIs fails still.

@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.

Thanks @zxf216 again for the excellent work! I just took a preliminary look and have left some inline comments. As you can see that we have various CI jobs for test cases, code format, license check, etc. I strongly recommend splitting the PR into smaller ones to make the review process easier.

Comment thread c++/include/orc/Common.hh Outdated
Comment thread c++/include/orc/Common.hh Outdated
Comment thread c++/include/orc/Common.hh Outdated
Comment thread c++/src/CMakeLists.txt
Comment thread c++/src/TypeImpl.cc
}
return nullptr;
}

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.

Please revert the unnecessary change.

Comment thread c++/include/orc/Reader.hh
struct ReaderOptionsPrivate;
struct RowReaderOptionsPrivate;

class KeyProvider;

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.

The c++/include/orc folder is public and files in it will be installed. If the KeyProvider is also public, please move its definition to the include folder as well. Otherwise, we should remove the related function from here.

@@ -0,0 +1,247 @@
// Copyright 2010-present vivo, Inc. All rights reserved.

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.

Please note that we have a license check which does not allow custom modification to the license header in this repo. I'm not sure if this violates any ASF rule to add something like this. @dongjoon-hyun Do you have any concern?

std::shared_ptr<SecretKeySpec> getStripeKey(long stripe);
};

// 加密变体,每个列一个

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.

Please use English for comment.

zxf216 and others added 3 commits August 14, 2024 07:04
Co-authored-by: Gang Wu <ustcwg@gmail.com>
Co-authored-by: Gang Wu <ustcwg@gmail.com>
Co-authored-by: Gang Wu <ustcwg@gmail.com>
@dongjoon-hyun dongjoon-hyun changed the title (削除) read encrypted ORC file (削除ここまで) (追記) [C++] read encrypted ORC file (追記ここまで) Sep 20, 2024

Copy link
Copy Markdown
Member

Gentle ping, @zxf216 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dongjoon-hyun dongjoon-hyun dongjoon-hyun left review comments
@wgtmac wgtmac wgtmac requested changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /