dosubot[bot] commented on issue #31779:
URL: https://github.com/apache/superset/issues/31779#issuecomment-2581849557

   <!-- Greeting -->
   Hey @tjsdud594, I'm here to help you with any bugs, questions, or 
contributions you have related to the project. Let me know how I can assist you!
   
   <!-- Answer -->
   The proposed solution involves modifying the `get_indexes` method in the 
`trino.py` module to handle Delta Lake and Iceberg tables more effectively. The 
modification checks for specific columns (`file_count`, `total_size`, `data`) 
that are typically associated with these table types. If these columns are 
present, it returns an empty list, which resolves the error encountered when 
previewing partitioned tables.
   
   Here's a summary of the changes:
   
   1. **Original Code**: The original method simply called the superclass's 
`get_indexes` and returned an empty list if a `NoSuchTableError` was raised.
   
   2. **Modified Code**: The updated method checks if the indexes contain a 
single entry with the name "partition" and if the columns to ignore 
(`file_count`, `total_size`, `data`) are present. If so, it returns an empty 
list, effectively bypassing the error for Delta Lake tables.
   
   3. **Final Suggested Code**: The final suggestion generalizes the solution 
to work for both Delta Lake and Iceberg tables by using a common set of columns 
to ignore.
   
   This approach enhances the robustness of the `get_indexes` method, ensuring 
compatibility with both Delta Lake and Iceberg tables, and resolves the issue 
of previewing partitioned tables in SQL Lab.
   
   
   <!-- Dosu Comment Footer -->
   *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
   
   ---
   <sup>Help Dosu learn! Give it feedback: [Great 
Response](https://app.dosu.dev/response-feedback/597c8ee1-20b2-4126-9fb0-b5639bc15fb9?feedback_type=great_response)
 | [Irrelevant 
Answer](https://app.dosu.dev/response-feedback/597c8ee1-20b2-4126-9fb0-b5639bc15fb9?feedback_type=irrelevant_answer)
 | [Incorrect 
Sources](https://app.dosu.dev/response-feedback/597c8ee1-20b2-4126-9fb0-b5639bc15fb9?feedback_type=incorrect_sources)
 | [Too 
Verbose](https://app.dosu.dev/response-feedback/597c8ee1-20b2-4126-9fb0-b5639bc15fb9?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/597c8ee1-20b2-4126-9fb0-b5639bc15fb9?feedback_type=hallucination)
 | 
[Other](https://app.dosu.dev/response-feedback/597c8ee1-20b2-4126-9fb0-b5639bc15fb9?feedback_type=other)</sup>
   


-- 
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