CodiumAI-Agent commented on PR #9520:
URL: 
https://github.com/apache/incubator-gluten/pull/9520#issuecomment-2853569898

   ## PR Code Suggestions ✨
   
   <!-- 8df2663 -->
   
   <table><thead><tr><td><strong>Category</strong></td><td 
align=left><strong>Suggestion&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
&nbsp; &nbsp; &nbsp; &nbsp; </strong></td><td 
align=center><strong>Impact</strong></td></tr><tbody><tr><td rowspan=1>Possible 
issue</td>
   <td>
   
   
   
   <details><summary>Include missing header</summary>
   
   ___
   
   
   **Add the header that defines <code>GlutenObjectStorageConfig</code> so this 
reference compiles. <br>Include the Common/GlutenConfig.h at the top of the 
file.**
   
   [cpp-ch/local-engine/Common/CHUtil.cpp 
[471]](https://github.com/apache/incubator-gluten/pull/9520/files#diff-6b784ec90e19280bb8929e65336adc1e73e9a1cc404cfc11378bbe0eb74a2f82R471-R471)
   
   ```diff
   +#include <Common/GlutenConfig.h>
   +...
    std::unordered_set<String> disk_types = 
{GlutenObjectStorageConfig::S3_DISK_TYPE, 
GlutenObjectStorageConfig::HDFS_DISK_TYPE, "cache"};
   ```
   <details><summary>Suggestion importance[1-10]: 9</summary>
   
   __
   
   Why: Without including `Common/GlutenConfig.h`, references to 
`GlutenObjectStorageConfig` will fail to compile, so adding the header is 
critical.
   
   
   </details></details></td><td align=center>High
   
   </td></tr><tr><td rowspan=1>General</td>
   <td>
   
   
   
   <details><summary>Preserve full diskType prefix</summary>
   
   ___
   
   
   **The logic strips the “_gluten” suffix and causes mismatched disk names in 
config <br>keys. Return the full diskType so configuration prefixes match 
actual identifiers.**
   
   
[backends-clickhouse/src/test/scala/org/apache/gluten/utils/StoreConfigBuilder.scala
 
[71-77]](https://github.com/apache/incubator-gluten/pull/9520/files#diff-9384042f55cd9a33f8608770c7571c80014cdfaba2f9cf847b25da4e371de76aR71-R77)
   
   ```diff
   -private def extractStorageType(typeString: String): String = {
   -  if (typeString.contains("_")) {
   -    typeString.split("_").head
   -  } else {
   -    typeString
   -  }
   -}
   +private def extractStorageType(typeString: String): String = typeString
   ```
   <details><summary>Suggestion importance[1-10]: 8</summary>
   
   __
   
   Why: The existing `extractStorageType` strips the `_gluten` suffix, causing 
disk names to mismatch those used by `CHUtil`, so returning the full `diskType` 
ensures the configuration keys align correctly.
   
   
   </details></details></td><td align=center>Medium
   
   </td></tr></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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to