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

Bug: bind error when filtering jsonb_array_elements_text with alias #12676

Closed
hzxa21 opened this issue Oct 8, 2023 · 2 comments
Closed

Bug: bind error when filtering jsonb_array_elements_text with alias #12676

hzxa21 opened this issue Oct 8, 2023 · 2 comments
Labels
type/bug Something isn't working
Milestone

Comments

@hzxa21
Copy link
Collaborator

hzxa21 commented Oct 8, 2023

Describe the bug

dev=> select sstable_id, level_id, sub_level_id, stale_key_count * 1.0 /total_key_count as delete_ratio, jsonb_array_elements_text(table_ids) as tid from rw_catalog.rw_hummock_sstables  limit 5;
 sstable_id | level_id | sub_level_id |          delete_ratio          |  tid  
------------+----------+--------------+--------------------------------+-------
   19411804 |        3 |              | 0.0026058631921824104234527687 | 21004
   19411804 |        3 |              | 0.0026058631921824104234527687 | 21005
   19411804 |        3 |              | 0.0026058631921824104234527687 | 21006
   19411804 |        3 |              | 0.0026058631921824104234527687 | 21009
   19411804 |        3 |              | 0.0026058631921824104234527687 | 21010
(5 rows)

dev=> select sstable_id, level_id, sub_level_id, stale_key_count * 1.0 /total_key_count as delete_ratio, jsonb_array_elements_text(table_ids) as tid from rw_catalog.rw_hummock_sstables where tid=21002 limit 5;
ERROR:  QueryError: Bind error: failed to bind expression: tid = 21002

Caused by:
  Item not found: Invalid column: tid

Error message/log

No response

To Reproduce

No response

Expected behavior

No response

How did you deploy RisingWave?

No response

The version of RisingWave

No response

Additional context

No response

@hzxa21 hzxa21 added the type/bug Something isn't working label Oct 8, 2023
@github-actions github-actions bot added this to the release-1.3 milestone Oct 8, 2023
@hzxa21
Copy link
Collaborator Author

hzxa21 commented Oct 8, 2023

cc @xiangjinwu Is this expected?

@hzxa21
Copy link
Collaborator Author

hzxa21 commented Oct 8, 2023

My bad. I should use tid='21002' instead of tid=21002

@hzxa21 hzxa21 closed this as completed Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant