You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tanishasaheb15 (via GitHub)" <gi...@apache.org> on 2023/08/22 16:58:52 UTC

[GitHub] [arrow] tanishasaheb15 opened a new pull request, #37313: Use C++17's nested namespaces

tanishasaheb15 opened a new pull request, #37313:
URL: https://github.com/apache/arrow/pull/37313

   <!--
   Thanks for opening a pull request!
   If this is your first pull request you can find detailed information on how 
   to contribute here:
     * [New Contributor's Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
     * [Contributing Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
   
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   -->
   
   ### Rationale for this change
   
   These changes include using the  C++ 17's nested namespace syntax.
   
   ### What changes are included in this PR?
   
   As a part of these changes i have updated the code to C++ 17 syntax.
   
   ### Are these changes tested?
   Compiled for all targets.
   
   <!--
   We typically require tests for all PRs in order to:
   1. Prevent the code from being accidentally broken by subsequent changes
   2. Serve as another way to document the expected behavior of the code
   
   If tests are not included in your PR, please explain why (for example, are they covered by existing tests)?
   -->
   
   ### Are there any user-facing changes?
   No.
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!--
   If there are any breaking changes to public APIs, please uncomment the line below and explain which changes are breaking.
   -->
   <!-- **This PR includes breaking changes to public APIs.** -->
   
   <!--
   Please uncomment the line below (and provide explanation) if the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld). We use this to highlight fixes to issues that may affect users without their knowledge. For this reason, fixing bugs that cause errors don't count, since those are usually obvious.
   -->
   <!-- **This PR contains a "Critical Fix".** -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] tanishasaheb15 commented on a diff in pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "tanishasaheb15 (via GitHub)" <gi...@apache.org>.
tanishasaheb15 commented on code in PR #37313:
URL: https://github.com/apache/arrow/pull/37313#discussion_r1307659331


##########
cpp/src/arrow/util/compression_snappy.cc:
##########
@@ -95,6 +92,4 @@ class SnappyCodec : public Codec {
 
 std::unique_ptr<Codec> MakeSnappyCodec() { return std::make_unique<SnappyCodec>(); }
 
-}  // namespace internal
-}  // namespace util
-}  // namespace arrow
+} // namespace arrow::util::internal

Review Comment:
   Addressed your comments, can you please approve workflow



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on PR #37313:
URL: https://github.com/apache/arrow/pull/37313#issuecomment-1727697278

   @tanishasaheb15 would you mind fix the lint in https://github.com/apache/arrow/actions/runs/6002401229/job/16280358863?pr=37313 ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #37313: GH-36620: [C++] Use C++17's nested namespaces

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #37313:
URL: https://github.com/apache/arrow/pull/37313#issuecomment-1688596634

   :warning: GitHub issue #36620 **has been automatically assigned in GitHub** to PR creator.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] wgtmac commented on a diff in pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on code in PR #37313:
URL: https://github.com/apache/arrow/pull/37313#discussion_r1305154440


##########
cpp/src/arrow/util/utf8.cc:
##########
@@ -192,5 +188,4 @@ Result<std::u16string> UTF8StringToUTF16(std::string_view source) {
   }
 }
 
-}  // namespace util
-}  // namespace arrow
+}

Review Comment:
   This line is incorrect.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #37313: Use C++17's nested namespaces

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #37313:
URL: https://github.com/apache/arrow/pull/37313#issuecomment-1688587225

   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
   -->
   
   Thanks for opening a pull request!
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/main/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose
   
   Opening GitHub issues ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename the pull request title in the following format?
   
       GH-${GITHUB_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   In the case of PARQUET issues on JIRA the title also supports:
   
       PARQUET-${JIRA_ISSUE_ID}: [${COMPONENT}] ${SUMMARY}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/arrow/pulls/)
     * [Contribution Guidelines - How to contribute patches](https://arrow.apache.org/docs/developers/contributing.html#how-to-contribute-patches)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] tanishasaheb15 commented on a diff in pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "tanishasaheb15 (via GitHub)" <gi...@apache.org>.
tanishasaheb15 commented on code in PR #37313:
URL: https://github.com/apache/arrow/pull/37313#discussion_r1305587255


##########
cpp/src/arrow/util/utf8.cc:
##########
@@ -192,5 +188,4 @@ Result<std::u16string> UTF8StringToUTF16(std::string_view source) {
   }
 }
 
-}  // namespace util
-}  // namespace arrow
+}

Review Comment:
   okay sure let me check this



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] tanishasaheb15 commented on a diff in pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "tanishasaheb15 (via GitHub)" <gi...@apache.org>.
tanishasaheb15 commented on code in PR #37313:
URL: https://github.com/apache/arrow/pull/37313#discussion_r1307659331


##########
cpp/src/arrow/util/compression_snappy.cc:
##########
@@ -95,6 +92,4 @@ class SnappyCodec : public Codec {
 
 std::unique_ptr<Codec> MakeSnappyCodec() { return std::make_unique<SnappyCodec>(); }
 
-}  // namespace internal
-}  // namespace util
-}  // namespace arrow
+} // namespace arrow::util::internal

Review Comment:
   @bkietz Addressed your comments, can you please approve workflow



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] tanishasaheb15 commented on pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "tanishasaheb15 (via GitHub)" <gi...@apache.org>.
tanishasaheb15 commented on PR #37313:
URL: https://github.com/apache/arrow/pull/37313#issuecomment-1695475063

   
   sure, added the fixes.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-36620: [C++] Use C++17's nested namespaces in arrow/util [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic closed pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util
URL: https://github.com/apache/arrow/pull/37313


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] tanishasaheb15 commented on pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "tanishasaheb15 (via GitHub)" <gi...@apache.org>.
tanishasaheb15 commented on PR #37313:
URL: https://github.com/apache/arrow/pull/37313#issuecomment-1695118617

   @pitrou  can you please re-run the build as i have tested the build locally it was working fine


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] tanishasaheb15 commented on a diff in pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "tanishasaheb15 (via GitHub)" <gi...@apache.org>.
tanishasaheb15 commented on code in PR #37313:
URL: https://github.com/apache/arrow/pull/37313#discussion_r1307605877


##########
cpp/src/arrow/util/compression_snappy.cc:
##########
@@ -95,6 +92,4 @@ class SnappyCodec : public Codec {
 
 std::unique_ptr<Codec> MakeSnappyCodec() { return std::make_unique<SnappyCodec>(); }
 
-}  // namespace internal
-}  // namespace util
-}  // namespace arrow
+} // namespace arrow::util::internal

Review Comment:
   Hmmm , Let me fix this as well 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] wgtmac commented on pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #37313:
URL: https://github.com/apache/arrow/pull/37313#issuecomment-1695302650

   I don't think rerun will resolve the issue. Please check the report carefully.
   
   ```
   FAILED: CMakeFiles/lint 
   cd /tmp/arrow-lint-xdzm4fix/cpp-build && /usr/local/bin/python /arrow/cpp/build-support/run_cpplint.py --cpplint_binary /arrow/cpp/build-support/cpplint.py --exclude_globs /arrow/cpp/build-support/lint_exclusions.txt --source_dir /arrow/cpp/src --source_dir /arrow/cpp/examples --source_dir /arrow/cpp/tools --quiet
   /arrow/cpp/src/arrow/util/byte_stream_split.h:626:  Namespace should be terminated with "// namespace arrow::util::internal"  [readability/namespace] [5]
   /arrow/cpp/src/arrow/util/compression_brotli.cc:257:  Namespace should be terminated with "// namespace arrow::util::internal"  [readability/namespace] [5]
   /arrow/cpp/src/arrow/util/compression_lz4.cc:540:  Namespace should be terminated with "// namespace arrow::util::internal"  [readability/namespace] [5]
   Done processing /arrow/cpp/src/arrow/util/byte_stream_split.h
   Done processing /arrow/cpp/src/arrow/util/compression_brotli.cc
   Done processing /arrow/cpp/src/arrow/util/compression_lz4.cc
   Total errors found: 3
   
   /arrow/cpp/src/arrow/util/compression_bz2.cc:283:  Namespace should be terminated with "// namespace arrow::util::internal"  [readability/namespace] [5]
   Done processing /arrow/cpp/src/arrow/util/compression_bz2.cc
   Total errors found: 1
   
   /arrow/cpp/src/arrow/util/compression_snappy.cc:95:  Namespace should be terminated with "// namespace arrow::util::internal"  [readability/namespace] [5]
   /arrow/cpp/src/arrow/util/compression_snappy.cc:95:  Line ends in whitespace.  Consider deleting these extra spaces.  [whitespace/end_of_line] [4]
   /arrow/cpp/src/arrow/util/compression_zlib.cc:520:  Namespace should be terminated with "// namespace arrow::util::internal"  [readability/namespace] [5]
   /arrow/cpp/src/arrow/util/utf8.cc:87:  Namespace should be terminated with "// namespace internal"  [readability/namespace] [5]
   /arrow/cpp/src/arrow/util/utf8.cc:195:  Namespace should be terminated with "// namespace arrow::util"  [readability/namespace] [5]
   Done processing /arrow/cpp/src/arrow/util/compression_snappy.cc
   Done processing /arrow/cpp/src/arrow/util/compression_zlib.cc
   Done processing /arrow/cpp/src/arrow/util/utf8.cc
   Total errors found: 5
   
   /arrow/cpp/src/arrow/util/compression_zstd.cc:245:  Namespace should be terminated with "// namespace arrow::util::internal"  [readability/namespace] [5]
   Done processing /arrow/cpp/src/arrow/util/compression_zstd.cc
   Total errors found: 1
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] bkietz commented on a diff in pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "bkietz (via GitHub)" <gi...@apache.org>.
bkietz commented on code in PR #37313:
URL: https://github.com/apache/arrow/pull/37313#discussion_r1307591552


##########
cpp/src/arrow/util/compression_snappy.cc:
##########
@@ -95,6 +92,4 @@ class SnappyCodec : public Codec {
 
 std::unique_ptr<Codec> MakeSnappyCodec() { return std::make_unique<SnappyCodec>(); }
 
-}  // namespace internal
-}  // namespace util
-}  // namespace arrow
+} // namespace arrow::util::internal

Review Comment:
   I suspect this lack of newline will cause a clang-format error



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-36620: [C++] Use C++17's nested namespaces in arrow/util [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #37313:
URL: https://github.com/apache/arrow/pull/37313#issuecomment-3547071005

   Thank you for your contribution. Unfortunately, this pull request has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this PR will be closed in 14 days.  Feel free to re-open this if it has been closed in error. If you do not have repository permissions to reopen the PR, please tag a maintainer.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] tanishasaheb15 commented on pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "tanishasaheb15 (via GitHub)" <gi...@apache.org>.
tanishasaheb15 commented on PR #37313:
URL: https://github.com/apache/arrow/pull/37313#issuecomment-1688660940

   @pitrou can we please re-run the checks, not sure why it is failing. as the changes are not critical 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] pitrou commented on pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #37313:
URL: https://github.com/apache/arrow/pull/37313#issuecomment-1688666414

   @tanishasaheb15 We could, but we would probably get the same failures?
   You probably made a mistake. Did you compile locally?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] tanishasaheb15 commented on pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "tanishasaheb15 (via GitHub)" <gi...@apache.org>.
tanishasaheb15 commented on PR #37313:
URL: https://github.com/apache/arrow/pull/37313#issuecomment-1693638199

   @pitrou  can you please approve the workflow ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] bkietz commented on pull request #37313: GH-36620: [C++] Use C++17's nested namespaces in arrow/util

Posted by "bkietz (via GitHub)" <gi...@apache.org>.
bkietz commented on PR #37313:
URL: https://github.com/apache/arrow/pull/37313#issuecomment-1699782742

   Looks like you've still got some format errors. You should be able to fix those locally using [`archery lint --cpplint --clang-format --clang-tidy --fix`](https://arrow.apache.org/docs/dev/developers/cpp/development.html#code-style-linting-and-ci). I also recommend configuring your editor to format every time you save, which boosts QOL significantly


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org