You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "gaoyangxiaozhu (via GitHub)" <gi...@apache.org> on 2024/04/22 11:00:13 UTC

[PR] [VL] Refactor VeloxParquetDatasource [incubator-gluten]

gaoyangxiaozhu opened a new pull request, #5486:
URL: https://github.com/apache/incubator-gluten/pull/5486

   ## What changes were proposed in this pull request?
   
   The PR to extend the class to VeloxParquetDatsourceS3, VeloxParquetDatsourceGCS and VeloxParquetDatsourceABFS, insted of puting all of them in the same file as to address this comment https://github.com/apache/incubator-gluten/pull/3978#discussion_r1419928243
   
   and it is also a pre-PR for onboarding **ABFS write part** code change.
   
   (Fixes: \#ISSUE-ID)
   
   ## How was this patch tested?
   
   (Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
   
   
   (If this patch involves UI changes, please attach a screenshot; otherwise, remove 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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Refactor VeloxParquetDatasource [incubator-gluten]

Posted by "gaoyangxiaozhu (via GitHub)" <gi...@apache.org>.
gaoyangxiaozhu commented on PR #5486:
URL: https://github.com/apache/incubator-gluten/pull/5486#issuecomment-2074147393

   @zhli1142015 help merge


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Refactor VeloxParquetDatasource [incubator-gluten]

Posted by "GlutenPerfBot (via GitHub)" <gi...@apache.org>.
GlutenPerfBot commented on PR #5486:
URL: https://github.com/apache/incubator-gluten/pull/5486#issuecomment-2074347206

   ===== Performance report for TPCH SF2000 with Velox backend, for reference only ====
   <table border="1" cellpadding="0" cellspacing="0">
                   <tbody>
                       <tr>
                               <td><font color=#000000>query</font></td>
                               <td><font color=#000000>log/native_5486_time.csv</font></td>
                               <td><font color=#000000>log/native_master_04_23_2024_fd2519a2b_time.csv</font></td>
                               <td><font color=#000000>difference</font></td>
                               <td><font color=#000000>percentage</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>q1</font></td>
                               <td><font color=#F92663>36.06</font></td>
                               <td><font color=#F92663>36.36</font></td>
                               <td><font color=#F92663>0.298</font></td>
                               <td><font color=#F92663>100.83%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#6F9915>q2</font></td>
                               <td><font color=#6F9915>24.92</font></td>
                               <td><font color=#6F9915>24.01</font></td>
                               <td><font color=#6F9915>-0.914</font></td>
                               <td><font color=#6F9915>96.33%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#6F9915>q3</font></td>
                               <td><font color=#6F9915>36.97</font></td>
                               <td><font color=#6F9915>36.90</font></td>
                               <td><font color=#6F9915>-0.066</font></td>
                               <td><font color=#6F9915>99.82%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#6F9915>q4</font></td>
                               <td><font color=#6F9915>40.59</font></td>
                               <td><font color=#6F9915>39.08</font></td>
                               <td><font color=#6F9915>-1.505</font></td>
                               <td><font color=#6F9915>96.29%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>q5</font></td>
                               <td><font color=#F92663>69.90</font></td>
                               <td><font color=#F92663>69.94</font></td>
                               <td><font color=#F92663>0.040</font></td>
                               <td><font color=#F92663>100.06%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>q6</font></td>
                               <td><font color=#F92663>5.69</font></td>
                               <td><font color=#F92663>7.58</font></td>
                               <td><font color=#F92663>1.887</font></td>
                               <td><font color=#F92663>133.16%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>q7</font></td>
                               <td><font color=#F92663>86.00</font></td>
                               <td><font color=#F92663>86.14</font></td>
                               <td><font color=#F92663>0.136</font></td>
                               <td><font color=#F92663>100.16%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#6F9915>q8</font></td>
                               <td><font color=#6F9915>85.65</font></td>
                               <td><font color=#6F9915>85.13</font></td>
                               <td><font color=#6F9915>-0.529</font></td>
                               <td><font color=#6F9915>99.38%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#6F9915>q9</font></td>
                               <td><font color=#6F9915>123.44</font></td>
                               <td><font color=#6F9915>122.27</font></td>
                               <td><font color=#6F9915>-1.166</font></td>
                               <td><font color=#6F9915>99.06%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#6F9915>q10</font></td>
                               <td><font color=#6F9915>43.93</font></td>
                               <td><font color=#6F9915>43.15</font></td>
                               <td><font color=#6F9915>-0.779</font></td>
                               <td><font color=#6F9915>98.23%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>q11</font></td>
                               <td><font color=#F92663>20.39</font></td>
                               <td><font color=#F92663>21.01</font></td>
                               <td><font color=#F92663>0.624</font></td>
                               <td><font color=#F92663>103.06%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>q12</font></td>
                               <td><font color=#F92663>27.18</font></td>
                               <td><font color=#F92663>27.87</font></td>
                               <td><font color=#F92663>0.685</font></td>
                               <td><font color=#F92663>102.52%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#6F9915>q13</font></td>
                               <td><font color=#6F9915>55.82</font></td>
                               <td><font color=#6F9915>55.25</font></td>
                               <td><font color=#6F9915>-0.566</font></td>
                               <td><font color=#6F9915>98.99%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#6F9915>q14</font></td>
                               <td><font color=#6F9915>23.91</font></td>
                               <td><font color=#6F9915>20.45</font></td>
                               <td><font color=#6F9915>-3.460</font></td>
                               <td><font color=#6F9915>85.53%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#6F9915>q15</font></td>
                               <td><font color=#6F9915>30.61</font></td>
                               <td><font color=#6F9915>28.88</font></td>
                               <td><font color=#6F9915>-1.733</font></td>
                               <td><font color=#6F9915>94.34%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>q16</font></td>
                               <td><font color=#F92663>13.87</font></td>
                               <td><font color=#F92663>14.54</font></td>
                               <td><font color=#F92663>0.679</font></td>
                               <td><font color=#F92663>104.89%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>q17</font></td>
                               <td><font color=#F92663>105.10</font></td>
                               <td><font color=#F92663>106.73</font></td>
                               <td><font color=#F92663>1.632</font></td>
                               <td><font color=#F92663>101.55%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>q18</font></td>
                               <td><font color=#F92663>145.31</font></td>
                               <td><font color=#F92663>147.26</font></td>
                               <td><font color=#F92663>1.949</font></td>
                               <td><font color=#F92663>101.34%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>q19</font></td>
                               <td><font color=#F92663>13.62</font></td>
                               <td><font color=#F92663>13.90</font></td>
                               <td><font color=#F92663>0.275</font></td>
                               <td><font color=#F92663>102.02%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#6F9915>q20</font></td>
                               <td><font color=#6F9915>29.61</font></td>
                               <td><font color=#6F9915>28.89</font></td>
                               <td><font color=#6F9915>-0.724</font></td>
                               <td><font color=#6F9915>97.56%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>q21</font></td>
                               <td><font color=#F92663>288.87</font></td>
                               <td><font color=#F92663>295.12</font></td>
                               <td><font color=#F92663>6.252</font></td>
                               <td><font color=#F92663>102.16%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>q22</font></td>
                               <td><font color=#F92663>14.81</font></td>
                               <td><font color=#F92663>17.71</font></td>
                               <td><font color=#F92663>2.892</font></td>
                               <td><font color=#F92663>119.52%</font></td>
                       </tr>
                       <tr>
                               <td><font color=#F92663>total</font></td>
                               <td><font color=#F92663>1322.25</font></td>
                               <td><font color=#F92663>1328.16</font></td>
                               <td><font color=#F92663>5.908</font></td>
                               <td><font color=#F92663>100.45%</font></td>
                       </tr>
                   </tbody>
               </table>


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Refactor VeloxParquetDatasource [incubator-gluten]

Posted by "gaoyangxiaozhu (via GitHub)" <gi...@apache.org>.
gaoyangxiaozhu commented on PR #5486:
URL: https://github.com/apache/incubator-gluten/pull/5486#issuecomment-2069102973

   @FelixYBW / @tigrux 


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Refactor VeloxParquetDatasource [incubator-gluten]

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

   <!--
     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/LICEGJ-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!
   
   Could you open an issue for this pull request on Github Issues?
   
   https://github.com/apache/incubator-gluten/issues
   
   Then could you also rename ***commit message*** and ***pull request title*** in the following format?
   
       [GLUTEN-${ISSUES_ID}][COMPONENT]feat/fix: ${detailed message}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/incubator-gluten/pulls/)
   
   


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Refactor VeloxParquetDatasource [incubator-gluten]

Posted by "JkSelf (via GitHub)" <gi...@apache.org>.
JkSelf commented on code in PR #5486:
URL: https://github.com/apache/incubator-gluten/pull/5486#discussion_r1575820912


##########
cpp/velox/operators/writer/VeloxParquetDatasource.h:
##########
@@ -51,20 +51,31 @@
 
 namespace gluten {
 
-class VeloxParquetDatasource final : public Datasource {
+inline bool isSupportedS3SdkPath(const std::string& filePath_) {
+  // support scheme
+  const std::array<const char*, 5> supported_schemes = {"s3:", "s3a:", "oss:", "cos:", "cosn:"};
+
+  for (const char* scheme : supported_schemes) {
+    size_t scheme_length = std::strlen(scheme);
+    if (filePath_.length() >= scheme_length && std::strncmp(filePath_.c_str(), scheme, scheme_length) == 0) {
+      return true;
+    }
+  }
+  return false;
+}
+
+inline bool isSupportedGCSPath(const std::string& filePath_) {
+  return strncmp(filePath_.c_str(), "gs:", 3) == 0;
+}
+
+class VeloxParquetDatasource : public Datasource {

Review Comment:
   @gaoyangxiaozhu Could we also refactor the HDFS-related modifications into a separate class, VeloxParquetDatasourceHDFS, and maintain only local filesystem operations within VeloxParquetDatasource?



-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Refactor VeloxParquetDatasource [incubator-gluten]

Posted by "gaoyangxiaozhu (via GitHub)" <gi...@apache.org>.
gaoyangxiaozhu commented on code in PR #5486:
URL: https://github.com/apache/incubator-gluten/pull/5486#discussion_r1575880297


##########
cpp/velox/operators/writer/VeloxParquetDatasource.h:
##########
@@ -51,20 +51,31 @@
 
 namespace gluten {
 
-class VeloxParquetDatasource final : public Datasource {
+inline bool isSupportedS3SdkPath(const std::string& filePath_) {
+  // support scheme
+  const std::array<const char*, 5> supported_schemes = {"s3:", "s3a:", "oss:", "cos:", "cosn:"};
+
+  for (const char* scheme : supported_schemes) {
+    size_t scheme_length = std::strlen(scheme);
+    if (filePath_.length() >= scheme_length && std::strncmp(filePath_.c_str(), scheme, scheme_length) == 0) {
+      return true;
+    }
+  }
+  return false;
+}
+
+inline bool isSupportedGCSPath(const std::string& filePath_) {
+  return strncmp(filePath_.c_str(), "gs:", 3) == 0;
+}
+
+class VeloxParquetDatasource : public Datasource {

Review Comment:
   sure, let me do the change



-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Refactor VeloxParquetDatasource [incubator-gluten]

Posted by "gaoyangxiaozhu (via GitHub)" <gi...@apache.org>.
gaoyangxiaozhu commented on PR #5486:
URL: https://github.com/apache/incubator-gluten/pull/5486#issuecomment-2071577685

   @zhouyuan could you review ?


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [PR] [VL] Refactor VeloxParquetDatasource [incubator-gluten]

Posted by "zhli1142015 (via GitHub)" <gi...@apache.org>.
zhli1142015 merged PR #5486:
URL: https://github.com/apache/incubator-gluten/pull/5486


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org