Skip to content

[MatrixCamp] Add Aggregate function bit_and - #2092

Merged
yingfeng merged 1 commit into
matrixorigin:mainfrom
noneback:camp_bitAnd_agg
Apr 1, 2022
Merged

yingfeng merged 1 commit into
matrixorigin:mainfrom
noneback:camp_bitAnd_agg

Conversation

@noneback

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #1993

What this PR does / why we need it:

Add aggregate function bit_and

Special notes for your reviewer:

Not Available

Additional documentation (e.g. design docs, usage docs, etc.):

Not Available

@yingfeng
yingfeng requested a review from m-schen April 1, 2022 04:07
@domingozhang domingozhang added the good first issue Good for newcomers label Apr 1, 2022

@m-schen m-schen left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally, the use of underscores in package names is not recommended in golang,
We suggest you keep your package name and directory the same.
you can change the package name and directory from bit_and to bitand @noneback

and other code is good.
And so sorry that we change the tutorial for aggregate function yesterday. you can read it, and we need you to provide a results of simple performance tests while pull request. you can just comment it at pr.

@noneback

noneback commented Apr 1, 2022 •

Copy link
Copy Markdown
Contributor Author

Ok. I will fix it. Thx for your review.

@noneback

noneback commented Apr 1, 2022 •

Copy link
Copy Markdown
Contributor Author

Generally, the use of underscores in package names is not recommended in golang, We suggest you keep your package name and directory the same. you can change the package name and directory from bit_and to bitand @noneback

and other code is good. And so sorry that we change the tutorial for aggregate function yesterday. you can read it, and we need you to provide a results of simple performance tests while pull request. you can just comment it at pr.

Is there any better way to download the test data rather than baidu-netdisk? Downloading via a browser will be way better than it. @m-schen

@noneback
noneback requested a review from m-schen April 1, 2022 07:50
@dengn

dengn commented Apr 1, 2022

Copy link
Copy Markdown
Contributor

Generally, the use of underscores in package names is not recommended in golang, We suggest you keep your package name and directory the same. you can change the package name and directory from bit_and to bitand @noneback
and other code is good. And so sorry that we change the tutorial for aggregate function yesterday. you can read it, and we need you to provide a results of simple performance tests while pull request. you can just comment it at pr.

Is there any better way to download the test data rather than baidu-netdisk? Downloading via a browser will be way better than it. @m-schen

If you find baidu-Netdisk too slow, maybe this weiyun disk link for downloading this dataset helps: https://share.weiyun.com/rF3HjsSR code:9u8xz8

@noneback

noneback commented Apr 1, 2022

Copy link
Copy Markdown
Contributor Author

Generally, the use of underscores in package names is not recommended in golang, We suggest you keep your package name and directory the same. you can change the package name and directory from bit_and to bitand @noneback
and other code is good. And so sorry that we change the tutorial for aggregate function yesterday. you can read it, and we need you to provide a results of simple performance tests while pull request. you can just comment it at pr.

Is there any better way to download the test data rather than baidu-netdisk? Downloading via a browser will be way better than it. @m-schen

If you find baidu-Netdisk too slow, maybe this weiyun disk link for downloading this dataset helps: https://share.weiyun.com/rF3HjsSR code:9u8xz8

I think it is still quite slow. Maybe aliyundrive will be better. Can you upload it again?

@m-schen

m-schen commented Apr 1, 2022

Copy link
Copy Markdown
Contributor

Generally, the use of underscores in package names is not recommended in golang, We suggest you keep your package name and directory the same. you can change the package name and directory from bit_and to bitand @noneback
and other code is good. And so sorry that we change the tutorial for aggregate function yesterday. you can read it, and we need you to provide a results of simple performance tests while pull request. you can just comment it at pr.

Is there any better way to download the test data rather than baidu-netdisk? Downloading via a browser will be way better than it. @m-schen

If you find baidu-Netdisk too slow, maybe this weiyun disk link for downloading this dataset helps: https://share.weiyun.com/rF3HjsSR code:9u8xz8

I think it is still quite slow. Maybe aliyundrive will be better. Can you upload it again?

if you are not Mac, you can download the code and generate data yourself.
https://docs.matrixorigin.io/0.3.0/MatrixOne/Get-Started/Tutorial/SSB-test-with-matrixone/#3-create-tables-in-matrixone
you just need to load one table but not all.
or you should wait a moment, we need to discuss how to solve this problem.

Or 我有会员,你需要吗

@dengn

dengn commented Apr 1, 2022

Copy link
Copy Markdown
Contributor

Generally, the use of underscores in package names is not recommended in golang, We suggest you keep your package name and directory the same. you can change the package name and directory from bit_and to bitand @noneback
and other code is good. And so sorry that we change the tutorial for aggregate function yesterday. you can read it, and we need you to provide a results of simple performance tests while pull request. you can just comment it at pr.

Is there any better way to download the test data rather than baidu-netdisk? Downloading via a browser will be way better than it. @m-schen

If you find baidu-Netdisk too slow, maybe this weiyun disk link for downloading this dataset helps: https://share.weiyun.com/rF3HjsSR code:9u8xz8

I think it is still quite slow. Maybe aliyundrive will be better. Can you upload it again?

Aliyundrive doesn't support sharing this kind of file. We will upload it to a Tencent Cloud object storage for faster downloading, the link will be shared later.

@noneback

noneback commented Apr 1, 2022

Copy link
Copy Markdown
Contributor Author

I will try to generate it. Thx.

@dengn

dengn commented Apr 1, 2022

Copy link
Copy Markdown
Contributor

@noneback

noneback commented Apr 1, 2022

Copy link
Copy Markdown
Contributor Author

@noneback

noneback commented Apr 1, 2022 •

Copy link
Copy Markdown
Contributor Author

I have tested as the tutorial says. Here is the result.@m-schen

  • Data
    10272594 rows
  • SQL
    select bit_and(LO_SUPPKEY) from lineorder_flat;
  • Result
+---------------------+
| bit_and(LO_SUPPKEY) |
+---------------------+
|                   0 |
+---------------------+
1 row in set (0.379 sec)
  • Additional
    The agg SUM result
MySQL [ssb]> select SUM(LO_SUPPKEY) from lineorder_flat;
+-----------------+
| sum(LO_SUPPKEY) |
+-----------------+
|      1033298590 |
+-----------------+
1 row in set (0.313 sec)

@m-schen m-schen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

get it. code is good. thanks.

@mergify mergify Bot added the reviewed label Apr 1, 2022
@dengn
dengn requested a review from domingozhang April 1, 2022 12:10

@yingfeng yingfeng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do not modify go.mod since matrixcube has been upgraded

@noneback

noneback commented Apr 1, 2022 •

Copy link
Copy Markdown
Contributor Author

Do not modify go.mod since matrixcube has been upgraded

I don't get it. It seems I never modify go.mod on the basis of the result from git diff and file change tab @yingfeng

@noneback
noneback requested a review from yingfeng April 1, 2022 14:50

@yingfeng yingfeng left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I made a mistake. It's OK

@yingfeng
yingfeng merged commit f6dd5ff into matrixorigin:main Apr 1, 2022
@matrix-meow matrix-meow mentioned this pull request Jan 4, 2024
1 of 7 tasks
fengttt pushed a commit to fengttt/matrixone that referenced this pull request May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants