Skip to content

Conversation

@b41sh
Copy link
Member

@b41sh b41sh commented May 9, 2025

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

Summary

This PR addresses several issues related to virtual columns in Databend, focusing on stability and correctness.

Key Changes:

  1. Fix: Virtual Column Binder Cast Issue:

    • Addresses a bug where virtual columns could not be found during the binding process due to cast rewrite virtual column.
  2. Fix: Merge Into Stream Column Deletion:

    • Resolves an issue in MERGE INTO statements where deleting a stream column could incorrectly lead to the deletion of a virtual column. This fix ensures that only the intended stream column is removed, preserving the integrity of virtual columns.
  3. Improvement: Virtual Column Data Read Validation:

    • Implements a check for row counts when reading virtual column data. This enhancement ignore corrupted virtual column data, preventing potential errors and improving data reliability.
  4. Feature: Experimental Virtual Column Setting:

    • Introduces a new setting, enable_experimental_virtual_column, to control the virtual column feature. This setting is disabled by default, reflecting the experimental nature of the feature and allowing users to opt-in.
    • This setting provides a safeguard against unexpected issues, and we will add more tests to improve this feature.

Future Work:

  • Add more comprehensive tests to cover various virtual column scenarios.
  • Continue to refine and improve the virtual column functionality based on user feedback and testing results.

fixes: #[Link the issue here]

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 May 9, 2025
@b41sh b41sh marked this pull request as ready for review May 9, 2025 10:34
@b41sh b41sh requested review from BohuTANG and sundy-li May 9, 2025 10:34
@BohuTANG BohuTANG merged commit 6892f0c into databendlabs:main May 9, 2025
76 checks passed
@b41sh b41sh changed the title fix(query): fix virtual column bind column fix(query): Fix the issue of the virtual column bind May 10, 2025
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