fix: ODPS data source table preview failed #32301#32310
fix: ODPS data source table preview failed #32301#32310zhutong6688 wants to merge 39 commits intoapache:masterfrom
Conversation
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Fix Detected |
|---|---|---|
| Undefined partition variable in ODPS preview logic ▹ view | ✅ |
Files scanned
| File Path | Reviewed |
|---|---|
| superset/databases/utils.py | ✅ |
| superset/daos/database.py | ✅ |
| superset/sql/parse.py | ✅ |
| superset/models/core.py | ✅ |
| superset/databases/api.py | ✅ |
| superset/db_engine_specs/base.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Need a new review? Comment
/korbit-reviewon this PR and I'll review your latest changes.Korbit Guide: Usage and Customization
Interacting with Korbit
- You can manually ask Korbit to review your PR using the
/korbit-reviewcommand in a comment at the root of your PR.- You can ask Korbit to generate a new PR description using the
/korbit-generate-pr-descriptioncommand in any comment on your PR.- Too many Korbit comments? I can resolve all my comment threads if you use the
/korbit-resolvecommand in any comment on your PR.- Chat with Korbit on issues we post by tagging @korbit-ai in your reply.
- Help train Korbit to improve your reviews by giving a 👍 or 👎 on the comments Korbit posts.
Customizing Korbit
- Check out our docs on how you can make Korbit work best for you and your team.
- Customize Korbit for your organization through the Korbit Console.
Feedback and Support
|
Thank you for the PR! I left a few comments and also you'll need to run added changes against established pre-commit hooks here. |
superset/daos/database.py
Outdated
| access_id = match.group('username') | ||
| project = match.group('project') | ||
| endpoint = match.group('endpoint') | ||
| access_key = passwd |
There was a problem hiding this comment.
Re-assign DB's password to a 3rd variable seems odd here.
There was a problem hiding this comment.
Access_key=passwd, I assigned passwd to Access_key, so that when using ODPS to build connections later, I have a visual experience of AK and Secret
There was a problem hiding this comment.
Are there any benefits aside of readability? I'm not holding strong opinion on this but feels like this assignment is a bit excessive.
|
Could you please help me run a CI again so that I can see if there are any other check errors,Thanks again |
|
please help me run a CI again,thanks a lot |
|
@hainenber If you have time now,please help me run a CI again,thanks a lot |
|
|
|
I'd recommend to have precommit installed and used to catch early CI issues. |
Okay, got it |
|
@hainenber please help me run a CI again,thanks a lot |
|
Could you please help me agree and check the code online? Thank you |
|
CI has already run. I’ll be reviewing your code. |
|
I found that the code for table preview has been greatly adjusted, which is exactly where I fixed it. The interface calls are different from what I modified before, and the only thing fixed is the improvement. It is suggested to slow down the improvement of this section of code, as there are indeed many bugs and bug fixes cannot keep up with the speed of improving the code. This is not reasonable, and it is more appropriate to prioritize bug fixes in the code. |
…to fix-odps-partition-bug-32301
|
@hainenber I have adjusted the code. Thank you for agreeing to run the constantly blocked reviews。 |
|
@hainenber @rusackas @sadpandajoe @bgreenlee Let's take a look at this PR (#32556) later. The previous PR (#32310) modified a lot of underlying basic classes. Although other data sources were not affected according to my testing, the testing unit classes of superset need to be adjusted too much. Therefore, I submitted a new PR, which tries not to modify the underlying basic classes as much as possible, but modifies the logical collection to the odps.by file, without causing too much impact on a large number of unit testing classes. |
|
Let's pay attention to this PR(https://github.com/apache/superset/pull/32556) in the future. This PR will be closed for now. It has modified many underlying classes, which requires too many modifications to the test classes of the superset project itself。 |


SUMMARY
I fixed an error when using sqllab to preview data after configuring the odps data source in superset, and added partition restrictions for previewing SQL
fixes: #32301
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
This is a preview of the odps table data before the repair:

This is a preview of the repaired ODPS table data:



In addition, when using other data sources, there is no problem with testing and it does not affect other data sources
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION