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

Creating empty scramble should throw exception #351

Open
commercial-hippie opened this issue Feb 25, 2019 · 6 comments
Open

Creating empty scramble should throw exception #351

commercial-hippie opened this issue Feb 25, 2019 · 6 comments

Comments

@commercial-hippie
Copy link
Contributor

When a scramble is created on a empty data set I think it should throw an error to avoid broken scrambles. (I tried to append to the scramble later).

Here is a example I got from a scramble on a empty table:

{"schemaName":"verdict_scrambles","tableName":"my_table","originalSchemaName":"default","originalTableName":"my_table","aggregationBlockColumn":"verdictdbblock","aggregationBlockCount":1,"tierColumn":"verdictdbtier","numberOfTiers":1,"method":"UNIFORM","scramblingMethod":{"blockSize":1000000,"type":"uniform","maxBlockCount":100,"relativeSize":0.1,"storedProbDist":{"0":["Infinity"]},"MAIN_TABLE_SOURCE_ALIAS":"t","totalNumberOfblocks":0,"actualNumberOfBlocks":1,"mainTableAlias":"t","tierCount":1,"blockCount":0,"actualBlockCount":1},"hashColumn":null,"cumulativeDistributions":{"0":["Infinity"]}}
"cumulativeDistributions":{"0":["Infinity"]}
"storedProbDist":{"0":["Infinity"]}
@pyongjoo
Copy link
Member

pyongjoo commented Mar 5, 2019

I'm sorry that no one has been following up with this issue.

@dongyoungy Can you take a look into this? The fix seems to be pretty straightforward.

@dongyoungy
Copy link
Contributor

I have already asked Jiacheng to look at an efficient way of determining an empty table to solve this issue.

@pyongjoo
Copy link
Member

pyongjoo commented Mar 5, 2019

I see. That's great.

@commercial-hippie
Copy link
Contributor Author

No worries, thank you!

@Beastjoe
Copy link
Contributor

Beastjoe commented Mar 7, 2019

Hi, I have created a pull request to solve this problem. In the process of creating scramble, it will throw a VerdictDBException when empty table is detected.

@dongyoungy
Copy link
Contributor

@commercial-hippie FYI, the fix for this issue has been merged into master.

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

No branches or pull requests

4 participants