Skip to content

add count dataset python scipt - #19

Open
WangXuhongCN wants to merge 2 commits into
AI45Lab:masterfrom
WangXuhongCN:master
Open

add count dataset python scipt#19
WangXuhongCN wants to merge 2 commits into
AI45Lab:masterfrom
WangXuhongCN:master

Conversation

@WangXuhongCN

Copy link
Copy Markdown

first find all job id then counting them

table=table,
verbose=verbose,
): dataset
for index, dataset in enumerate(datasets)

@hsballoon hsballoon Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too much full-table scans here. Cause bad perf for this fucntion and would impact other reader.

the logic here first scans all job ids -> then performs another full-table LIKE query for each dataset. But LIKE cannot prune job_id HASH partitions, this increases S3, network and would make other readers slow.

Consider reading job_id once in batches and aggregate the counts locally instead.

_print_invalid_job_id_warning(invalid_job_ids)
print(
"Warning: counts use contains-LIKE matching and may overlap; "
"concurrent queries are not a single transactional snapshot.",

@hsballoon hsballoon Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use LIKE query for dataset count may lead to incorrect result. it counts any job id containing xxzz, not only those whose dataset prefix is datasetName. This warning here doesn't reoslve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants