Skip to content

[VL] Separate filesystem configuration initialization#10540

Merged
marin-ma merged 4 commits intoapache:mainfrom
marin-ma:separate-fs-config
Aug 29, 2025
Merged

[VL] Separate filesystem configuration initialization#10540
marin-ma merged 4 commits intoapache:mainfrom
marin-ma:separate-fs-config

Conversation

@marin-ma
Copy link
Contributor

getHiveConfig now parses configurations for all kinds of filesystems. It should not parse configurations for other kinds if it's called from a specific VeloxParquetDataSource implementation.

@marin-ma
Copy link
Contributor Author

@jinchengchenghh Could you help to review? Thanks!

Copy link
Member

@zhouyuan zhouyuan left a comment

Choose a reason for hiding this comment

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

Thanks!

for (const auto& [key, value] : sparkSuffixes) {
if (value.first == suffix) {
return std::optional<S3Config::Keys>(key);
if (contains(fsType, FileSystemType::kS3)) {
Copy link
Member

Choose a reason for hiding this comment

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

Shall we also add else clause here to guard some corner case?

kS3 = 1 << 1,
kAbfs = 1 << 2,
kGcs = 1 << 3,
kAll = (1 << 4) - 1
Copy link
Member

Choose a reason for hiding this comment

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

The code seems a bit complicated, how about using 0, 1, 2, 3 and std::num_limits<uint8_t>::max for kAll?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One bit is used for each fs type and we check if the corresponding bit is set. Seems like 0, 1, 2, 3 can't do the job.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It may not be a trivial code path to only parse two or three fs types. I will update the code

@marin-ma
Copy link
Contributor Author

@zhouyuan Could you help to review again? Thanks!

Copy link
Member

@zhouyuan zhouyuan left a comment

Choose a reason for hiding this comment

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

👍

@marin-ma marin-ma merged commit ad4393e into apache:main Aug 29, 2025
96 of 97 checks passed
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.

2 participants