Skip to content

[CALCITE-3153] Improve testing in TpcdsTest using assertEqual instead of printing results#1283

Merged
hsyuan merged 1 commit intoapache:masterfrom
LiShuMing:CALCITE-3153
Jul 30, 2019
Merged

[CALCITE-3153] Improve testing in TpcdsTest using assertEqual instead of printing results#1283
hsyuan merged 1 commit intoapache:masterfrom
LiShuMing:CALCITE-3153

Conversation

@LiShuMing
Copy link
Contributor

It's a little improve to use assertEqual instead of just printing result in TpcdsTest#testQuery27Builder.

// foo(with, "WEB_PAGE", 60);
// foo(with, "WEB_RETURNS", 71_763);
// foo(with, "WEB_SALES", 719_384);
// foo(with, "WEB_SITE", 30);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why to open up these tests ? which seems has no relationship with the fix title.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for @danny0405 's replies. I just doubt why this should be commented。If it's not ok, i will keep original instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see @julianhyde did the modification in 93b8349, maybe he can answer you!

Copy link
Member

Choose a reason for hiding this comment

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

I would assume to avoid generating data for those tables just for the sake of count queries but I may be wrong.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for @zabetak 's replies. Those tables' rowCounts are added in org.apache.calcite.adapter.tpcds.TpcdsSchema, it uses TABLE_ROW_COUNTS mapping to maintaince tables' rowCounts. So I think there's no cost to generate data?

Maybe it's better to open up these tests again?

Copy link
Member

Choose a reason for hiding this comment

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

I see that foo method executes a query to the table passed as a parameter. If I remember well TpcdsQueryableTable which I think is involved on this query generates the respective data every time it is referenced.

Copy link
Contributor Author

@LiShuMing LiShuMing Jun 28, 2019

Choose a reason for hiding this comment

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

If those codes are useless, so just remove them any more? I wonder what I should do, maybe just keep it unchanged?

@zabetak
Copy link
Member

zabetak commented Jun 28, 2019

Hey @LiShuMing, it seems that you have checkstyle violations. In most cases before submitting a PR it is highly recommended to test that the build passes locally mvn clean install.

@LiShuMing
Copy link
Contributor Author

Hey @LiShuMing, it seems that you have checkstyle violations. In most cases before submitting a PR it is highly recommended to test that the build passes locally mvn clean install.

Sorry, it's my first merge request. I'll fix it right now.

Copy link
Member

@hsyuan hsyuan left a comment

Choose a reason for hiding this comment

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

Now the changes look good to me.

Copy link
Member

@zabetak zabetak left a comment

Choose a reason for hiding this comment

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

LGTM

@hsyuan hsyuan added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Jul 23, 2019
@hsyuan
Copy link
Member

hsyuan commented Jul 23, 2019

@LiShuMing Can you squash the commits? I will merge this PR after that.

@LiShuMing
Copy link
Contributor Author

Thanks for @hsyuan 's replies. I just resolve the comments.

@hsyuan
Copy link
Member

hsyuan commented Jul 29, 2019

retrigger tests

@hsyuan hsyuan closed this Jul 29, 2019
@hsyuan hsyuan reopened this Jul 29, 2019
@hsyuan hsyuan merged commit 0061b2a into apache:master Jul 30, 2019
@LiShuMing LiShuMing deleted the CALCITE-3153 branch July 30, 2019 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LGTM-will-merge-soon Overall PR looks OK. Only minor things left.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants