Skip to content

Commit

Permalink
fix doc and add default
Browse files Browse the repository at this point in the history
  • Loading branch information
majetideepak committed Oct 17, 2024
1 parent 9d4cfb2 commit 98a8ab0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion velox/connectors/hive/HiveConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ std::optional<std::string> HiveConfig::s3RetryMode() const {
}

std::string HiveConfig::gcsEndpoint() const {
return config_->get<std::string>(kGCSEndpoint, std::string(""));
return config_->get<std::string>(
kGCSEndpoint, std::string("https://storage.googleapis.com"));
}

std::string HiveConfig::gcsCredentialsPath() const {
Expand Down
4 changes: 2 additions & 2 deletions velox/connectors/hive/tests/HiveConfigTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ TEST(HiveConfigTest, defaultConfig) {
ASSERT_EQ(hiveConfig.s3SecretKey(), std::nullopt);
ASSERT_EQ(hiveConfig.s3IAMRole(), std::nullopt);
ASSERT_EQ(hiveConfig.s3IAMRoleSessionName(), "velox-session");
ASSERT_EQ(hiveConfig.gcsEndpoint(), "");
ASSERT_EQ(hiveConfig.gcsEndpoint(), "https://storage.googleapis.com");
ASSERT_EQ(hiveConfig.gcsCredentialsPath(), "");
ASSERT_EQ(hiveConfig.isOrcUseColumnNames(emptySession.get()), false);
ASSERT_EQ(
Expand Down Expand Up @@ -207,7 +207,7 @@ TEST(HiveConfigTest, overrideSession) {
ASSERT_EQ(hiveConfig.s3SecretKey(), std::nullopt);
ASSERT_EQ(hiveConfig.s3IAMRole(), std::nullopt);
ASSERT_EQ(hiveConfig.s3IAMRoleSessionName(), "velox-session");
ASSERT_EQ(hiveConfig.gcsEndpoint(), "");
ASSERT_EQ(hiveConfig.gcsEndpoint(), "https://storage.googleapis.com");
ASSERT_EQ(hiveConfig.gcsCredentialsPath(), "");
ASSERT_EQ(hiveConfig.isOrcUseColumnNames(session.get()), true);
ASSERT_EQ(hiveConfig.isFileColumnNamesReadAsLowerCase(session.get()), true);
Expand Down
4 changes: 2 additions & 2 deletions velox/docs/configs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,8 @@ Each query can override the config by setting corresponding query session proper
- Description
* - hive.gcs.endpoint
- string
-
- The GCS storage endpoint server.
- https://storage.googleapis.com
- The GCS storage URI.
* - hive.gcs.json-key-file-path
- string
-
Expand Down

0 comments on commit 98a8ab0

Please sign in to comment.