Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set query_kind earlier to ensure it takes effect. #17302

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

youngsofun
Copy link
Member

@youngsofun youngsofun commented Jan 16, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

the bug may lead to performance regression when loading many small parquet files, for useless collection of statics of all parquet files.

introduced in https://github.com/databendlabs/databend/pull/17045/files#diff-5da9a5a6e26ef54156ba5550ed3dd65e7116c89b38aeb90a3b5156a4f8955caaL265

only affect version 688

maybe related to 17284.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe):

This change is Reviewable

@github-actions github-actions bot added the pr-bugfix this PR patches a bug in codebase label Jan 16, 2025
Copy link

what-the-diff bot commented Jan 16, 2025

PR Summary

  • Enhanced SQL Statement Identification
    Introduced a feature in the planning segment of the code (planner.rs) that identifies the type of SQL statement being processed. This enhancement allows for more efficient planning and improved handling of different SQL statements.

  • Optimized Query String Attachment
    Refactored the method used to attach the query string in planner.rs. This update uses the newly created query_kind variable to provide a clearer and more consistent method for attaching the query string.

  • Validation for Query Kind
    Enforced a check in parquet_table.rs to make sure the kind of query is valid. This additional validation helps prevent errors and issues that may occur due to incorrect or unknown query types.

  • Improved Error Handling for Unknown Query Kinds
    Upgraded the error handling mechanism in parquet_table.rs for unknown types of queries. With these improvements, the application can gracefully handle invalid states by returning appropriate responses when an invalid or unknown query type is encountered. This leads to better usability and robustness of the system.

@youngsofun youngsofun force-pushed the querykind branch 2 times, most recently from 99dca33 to 964b0b3 Compare January 16, 2025 06:19
maybe related to the performance regression reported in issue 17284.
@youngsofun youngsofun requested review from zhyass and b41sh January 16, 2025 07:20
@youngsofun youngsofun enabled auto-merge January 17, 2025 00:24
@BohuTANG BohuTANG disabled auto-merge January 17, 2025 01:17
@BohuTANG BohuTANG merged commit 31c243b into databendlabs:main Jan 17, 2025
73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants