[Enhancement] Support 4 phase aggregate for group by constant

What type of PR is this：

[ ] bug
[ ] feature
[x] enhancement
[ ] others

Which issues of this PR fixes ：

Fixes #6218
Problem Summary(Required) ：

Support 4 phase for group by constant
plan like this :
mysql> explain   select count(distinct lo_orderkey) from lineorder group by 1.00001;
+-------------------------------------------------------------------------------------------------+
| Explain String                                                                                |
+-------------------------------------------------------------------------------------------------+
| PLAN FRAGMENT 0                                                                                |
|  OUTPUT EXPRS:19: count                                                                         |
|   PARTITION: UNPARTITIONED                                                                      |
|                                                                                |
|   RESULT SINK                                                                                |
|                                                                                |
|   8:Project                                                                                |
|   |  <slot 19> : 19: count                                                                      |
|   |                                                                                |
|   7:AGGREGATE (merge finalize)                                                                  |
|   |  output: count(19: count)                                                                   |
|   |  group by: 18: expr                                                                         |
|   |                                                                                |
|   6:EXCHANGE                                                                                |
|                                                                                |
| PLAN FRAGMENT 1                                                                                |
|  OUTPUT EXPRS:                                                                                |
|   PARTITION: RANDOM                                                                             |
|                                                                                |
|   STREAM DATA SINK                                                                              |
|     EXCHANGE ID: 06                                                                             |
|     UNPARTITIONED                                                                               |
|                                                                                |
|   5:AGGREGATE (update serialize)                                                                |
|   |  STREAMING                                                                                |
|   |  output: count(1: lo_orderkey)                                                              |
|   |  group by: 18: expr                                                                         |
|   |                                                                                |
|   4:Project                                                                                |
|   |  <slot 1> : 1: lo_orderkey                                                                  |
|   |  <slot 18> : 1.00001                                                                        |
|   |                                                                                |
|   3:AGGREGATE (merge serialize)                                                                 |
|   |  group by: 1: lo_orderkey                                                                   |
|   |                                                                                |
|   2:AGGREGATE (update serialize)                                                                |
|   |  STREAMING                                                                                |
|   |  group by: 1: lo_orderkey                                                                   |
|   |                                                                                |
|   1:Project                                                                                |
|   |  <slot 1> : 1: lo_orderkey                                                                  |
|   |  <slot 18> : 1.00001                                                                        |
|   |                                                                                |
|   0:OlapScanNode                                                                                |
|      TABLE: lineorder                                                                           |
|      PREAGGREGATION: ON                                                                         |
|      partitions=1/1                                                                             |
|      rollup: lineorder                                                                          |
|      tabletRatio=10/10                                                                          |
|      tabletList=5970031,5970033,5970035,5970037,5970039,5970041,5970043,5970045,5970047,5970049 |
|      cardinality=600037902                                                                      |
|      avgRowSize=8.0                                                                             |
|      numNodes=0                                                                                |
+-------------------------------------------------------------------------------------------------+
53 rows in set (0.00 sec)

mysql> explain   select count(distinct lo_custkey) from lineorder group by 1.00001;
+-------------------------------------------------------------------------------------------------+
| Explain String                                                                                |
+-------------------------------------------------------------------------------------------------+
| PLAN FRAGMENT 0                                                                                |
|  OUTPUT EXPRS:19: count                                                                         |
|   PARTITION: UNPARTITIONED                                                                      |
|                                                                                |
|   RESULT SINK                                                                                |
|                                                                                |
|   9:Project                                                                                |
|   |  <slot 19> : 19: count                                                                      |
|   |                                                                                |
|   8:AGGREGATE (merge finalize)                                                                  |
|   |  output: count(19: count)                                                                   |
|   |  group by: 18: expr                                                                         |
|   |                                                                                |
|   7:EXCHANGE                                                                                |
|                                                                                |
| PLAN FRAGMENT 1                                                                                |
|  OUTPUT EXPRS:                                                                                |
|   PARTITION: HASH_PARTITIONED: 3: lo_custkey                                                    |
|                                                                                |
|   STREAM DATA SINK                                                                              |
|     EXCHANGE ID: 07                                                                             |
|     UNPARTITIONED                                                                               |
|                                                                                |
|   6:AGGREGATE (update serialize)                                                                |
|   |  STREAMING                                                                                |
|   |  output: count(3: lo_custkey)                                                               |
|   |  group by: 18: expr                                                                         |
|   |                                                                                |
|   5:Project                                                                                |
|   |  <slot 3> : 3: lo_custkey                                                                   |
|   |  <slot 18> : 1.00001                                                                        |
|   |                                                                                |
|   4:AGGREGATE (merge serialize)                                                                 |
|   |  group by: 3: lo_custkey                                                                    |
|   |                                                                                |
|   3:EXCHANGE                                                                                |
|                                                                                |
| PLAN FRAGMENT 2                                                                                |
|  OUTPUT EXPRS:                                                                                |
|   PARTITION: RANDOM                                                                             |
|                                                                                |
|   STREAM DATA SINK                                                                              |
|     EXCHANGE ID: 03                                                                             |
|     HASH_PARTITIONED: 3: lo_custkey                                                             |
|                                                                                |
|   2:AGGREGATE (update serialize)                                                                |
|   |  STREAMING                                                                                |
|   |  group by: 3: lo_custkey                                                                    |
|   |                                                                                |
|   1:Project                                                                                |
|   |  <slot 3> : 3: lo_custkey                                                                   |
|   |  <slot 18> : 1.00001                                                                        |
|   |                                                                                |
|   0:OlapScanNode                                                                                |
|      TABLE: lineorder                                                                           |
|      PREAGGREGATION: ON                                                                         |
|      partitions=1/1                                                                             |
|      rollup: lineorder                                                                          |
|      tabletRatio=10/10                                                                          |
|      tabletList=5970031,5970033,5970035,5970037,5970039,5970041,5970043,5970045,5970047,5970049 |
|      cardinality=600037902                                                                      |
|      avgRowSize=5.0                                                                             |
|      numNodes=0                                                                                |
+-------------------------------------------------------------------------------------------------+
63 rows in set (0.01 sec)

The time cost from 8s+ to 3.5s.
The four-stage plan will perform better with more BE

[FE PR Coverage check]
:heart_eyes: pass : 55 / 57 (96.49%)
file detail

path
covered line
new line
coverage

:large_blue_circle:
com/starrocks/sql/optimizer/rule/transformation/SplitAggregateRule.java
55
57
96.49%

[FE PR Coverage check]
:heart_eyes: pass : 67 / 69 (97.10%)
file detail

path
covered line
new line
coverage

:large_blue_circle:
com/starrocks/sql/optimizer/rule/transformation/SplitAggregateRule.java
67
69
97.10%

@Mergifyio backport branch-2.2


Add OAP manager

What changes were proposed in this pull request?
This is to resolve #706 . An OapManager is created in SparkEnv. In this way, multiple xxManager in OAP can be merged to one place, making it easy to manage, and get the object's reference.
After changing some current Object to Class implementations, like FiberCacheManager can be migrated to this place.
How was this patch tested?
Existing tests.

LGTM


[OS X] Spell checking language not autodetecting

The built in spell checking on OS X automatically detects the typed language among the configured system input languages. This doesn't seem to work in the message input field inside the OS X desktop app.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/31491279-os-x-spell-checking-language-not-autodetecting?utm_campaign=plugin&utm_content=tracker%2F19476668&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F19476668&utm_medium=issues&utm_source=github).

Do you have some idea how to do that?

No, sorry. In "normal" OS X applications "it just works" (i.e. it's a feature of the text input controls provided by the system)

Sure, but isn't the case in Electron application, we should implement this our selfs.
I will try to improve that.

I can't auto detect all the system languages, so I added an option to enable which languages you want via context menu.


Add support for multi-track audio in movie files

Currently, tlRender supports multiple tracks of audio in .otio files.
However, movie files with multiple embedded audio tracks are not supported, unlike mrViewer.
See SolLevante_HDR10_r2020_ST2084_UHD_24fps_1000nit.mov which has both a stereo (default) and a 5:1 audio track.

Added in v1.1.1.


Add docker production image

:tophat: What? Why?
Hi mountebank community, I think we should have a production docker image, I needed it on the past so should be great if you accept my PR.
I'm also trying to add this to the official supported docker images:

docker-library/official-images#7740
docker-library/docs#1693

❓ What it does?
This docker image get the latest version from npm in production, after that create a volume with a imposter example. In this way we can have an out-of-the-box demo.
docker run --rm -p 8080:8080 mountebank:latest

Every one who wants to use this image, just need to rewrite the volume /imposters with the custom imposters.
docker run --rm -v /path/to/imposters:/imposters -p 8080:8080 mountebank:latest

It use the ENTRYPOINT to make it easier to run, you can rewrite the command if you need to.
docker run --rm  -v /path/to/imposters:/imposters \
                    -p 8080:8080 \
                    mountebank:latest \
                    start --configfile myimposters.ejs

Or even with a docker-compose file:
version: '3'
services:
  mountebank:
    image: mountebank:2.2.0
    ports:
      - "2525:2525"
      - "8080:8080"
    volumes:
      - /path/to/imposters:/imposters
    command: start --configfile /imposters/custom-imposters.ejs --allowInjection

Thanks!

@bbyars thanks for accepting this, I also can make a PR to generate the docker on dockerhub and on github registry using github actions. Do you want help with that?

Yes! If you have the cycles, that'd be great. It's definitely something I
intended to add.
On Mon, Apr 13, 2020 at 11:56 AM Mijail Rondón<EMAIL_ADDRESS>wrote:

@bbyars https://github.com/bbyars thanks for accepting this, I also can
make a PR to generate the docker on dockerhub and on github registry using
github actions. Do you want help with that?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/bbyars/mountebank/pull/537#issuecomment-612986800,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAARFP6KG6XVINQ7PW2FEJ3RMM733ANCNFSM4MB33ZQA
.

Ok, so please can you add a secret with the content of the access token to your account on the secrets section?
settings/secrets
with DOCKER_ACCESS_TOKEN and then I can make a pull request to use github actions to build and publish the docker image on release tag.

Will do. Slammed with work this week, give me a few days.
On Mon, Apr 13, 2020 at 12:27 PM Mijail Rondón<EMAIL_ADDRESS>wrote:

Ok, so please can you add a secret with the content of the access token to
your account on the secrets section?
settings/secrets
with DOCKER_ACCESS_TOKEN and then I can make a pull request to use github
actions to build and publish the docker image on release tag.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/bbyars/mountebank/pull/537#issuecomment-613001187,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAARFP5BJHOIH4JW6TJFFD3RMNDRJANCNFSM4MB33ZQA
.

Ok sure, thanks!

Having MB as a pre-built docker image is really handy. One question - is there a way to start the image with --allowInjection enabled?

Hi @brunns, you can use the --allowInjection modifiying the CMD command, for example:
docker run ... start --allowInjection --configfile imposters.ejs


Need ability to customize logout function

Hello!
Recently I tried to use django-auto-logout to auto-terminate user sessions in my current django project.
It is also using django-oauth2-authcodeflow to autentificate users via Oauth2 provider.
In such a configuration it is not enough to just call to django.contrib.auth.logout() to terminate session.
It is necessary to notify auth provider on session termination using redirect to special URL (i.e. returning HttpResponseRedirect).
Please consider PR adding ability to specify custom function called when session termination is required:
https://github.com/bugov/django-auto-logout/pull/21

Sorry for late. Health issues. Can you give me tests - i'll fix it.

Hello!
Good health to you.
Do you mean unit tests or what?


[Switch] wrong custom ripple color

[x] The issue is present in the latest release.
[x] I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯
Documentation has example of custom switches. The first one is purple. If you hover over thumb and look closer the ripple effect color isn't based on purple, but on default secondary color. You can also ensure that behavior is wrong by inspecting the element.
Expected Behavior 🤔
Expecting ripple color on hover to be rgba(r, g, b, 0.04) where r,g,b is color from &$checked
Steps to Reproduce 🕹

Steps:

Go to https://material-ui.com/components/switches/
Scroll to the Customized switches
Inspect purple thumb and its ripple color on hover
(or copy Custom Switch, add any custom color and see that behavior is the same)

Context 🔦
As a VERY temporary solution this CSS rule may be used (change color for whatever you like):
.MuiSwitch-colorSecondary.Mui-checked:hover {
background-color: rgba(55, 142, 60, 0.04) !important;
}
Your Environment 🌎

Tech
Version

Material-UI
v4.9.14

React
16.11

Browser
Chrome 83.0.4103.116

TypeScript
-

etc.
-

Nice spot, yeah looks like this will be docs only change. It will make the demo slightly more complicated but I think that's fine.

@xanderoku Thanks for the report. Do you want to work on a pull request? :) It seems that this diff would be enough
diff --git a/docs/src/pages/components/switches/CustomizedSwitches.tsx b/docs/src/pages/components/switches/CustomizedSwitches.tsx
index 2179f9b5c..0d1c6db99 100644
--- a/docs/src/pages/components/switches/CustomizedSwitches.tsx
+++ b/docs/src/pages/components/switches/CustomizedSwitches.tsx
@@ -1,5 +1,5 @@
 import React from 'react';
-import { withStyles, Theme, createStyles } from '@material-ui/core/styles';
+import { fade, withStyles, Theme, createStyles } from '@material-ui/core/styles';
 import { purple } from '@material-ui/core/colors';
 import FormGroup from '@material-ui/core/FormGroup';
 import FormControlLabel from '@material-ui/core/FormControlLabel';
@@ -15,11 +15,14 @@ interface Props extends SwitchProps {
   classes: Styles;
 }

-const PurpleSwitch = withStyles({
+const PurpleSwitch = withStyles((theme: Theme) => ({
   switchBase: {
     color: purple[300],
     '&$checked': {
       color: purple[500],
+      '&:hover': {
+        backgroundColor: fade(purple[500], theme.palette.action.hoverOpacity),
+      },
     },
     '&$checked + $track': {
       backgroundColor: purple[500],
@@ -27,7 +30,7 @@ const PurpleSwitch = withStyles({
   },
   checked: {},
   track: {},
-})(Switch);
+}))(Switch);

 const IOSSwitch = withStyles((theme: Theme) =>
   createStyles({


Feature/1356 enhancements to import/export

Rewrote the import header parsing so it is not programming by exception.
Updated the regexes to allow for the * comments and # ignore columns
Collapsed ImportHelpers as they didn't need to be separate.
Updates some parts of #1356 (leave open - for the next PRs I will split the items out).
Fixes #2719 (this one can be moved to test)
Fixes #2796 (this one can be moved to test)

I don't know why this PR was merged because travis failed building it.
https://travis-ci.org/sakaiproject/sakai/builds/145799681
Now master build is broken, could you fix it please?


backend: remove email subscriptions from a transaction

We should not use a transation here as when we first check the email, the transation will inevitably error if the email is not yet in the db.

Uhm not sure that's necessary, I may have miss read the application logs


N/blog nautilus

Describes how we switched to Alpine as a base image.

Joe acknowledged in Slack.


Aqara Opple Six Button does not allow to use same buttom more than one time

When we triger a button, 1 for example, an event is received. however when we re trigger the same button, no event is received.
Mb we can use the same solution as for long press, an event request is received on the long press and then we release the button and a release request is received. that can change the state of a button from pressed -> to released -> pressed ... and not be blocked on the sate of pressed only.

I know. Will fix it.

Fixed


Add later features for Web Audio

@foolip We're still missing descriptions and my suggestions were marked as resolved. Is there a missing commit here, maybe?

@ddbeck weird, I don't know what happened. I'll fix it up.


Capacitor 6 Support

Summary
Capacitor 6 has been released, bringing support for Android 14 and iOS 17.
https://ionic.io/blog/announcing-capacitor-6-0
Could you inform us of the timeline for supporting Capacitor 6 with this plugin?
Desired Behavior
Works with Capacitor 6.
Possible Solution
https://capacitorjs.com/docs/updating/plugins/6-0
Additional context
In Capacitor 5, there are plugins that do not support the privacy manifest, My app have to be migrated to Capacitor 6.
And another issue is that the deadline for privacy manifest compliance is approaching.

@ha6-6ru  we will add this on our backlog and will update it here once it is released.

@ndesai-newrelic Understood. Thank you. I've submitted the following pull request, so please review it.
https://github.com/newrelic/newrelic-capacitor-plugin/pull/83

@ha6-6ru the capacitor agent 1.4.0 is released.

Thank you for the prompt response and for merging the changes!


Updates for latest conduit packages

happstack-authenticate-2 no longer uses the fb library. So we can stop supporting this once we no longer need happstack-authenticate-0 to perform migrations.

Does that mean people won't be able to use facebook authentication?

Yes and no. happstack-authenticate-2 supports authentication backend plugins. So if someone wishes to create and maintain a happstack-authenicate-fb plugin, then facebook can be supported.


AS a potato talk member, I want to be able to remove an objective assigned to me

AS a potato talk member, I want to be able to remove an objective assigned to me
SO THAT I can have an objective I don't want to do removed from my list
Acceptance Criteria
AS a potato talk member
GIVEN I want to be able to remove an objective assigned to me
AND I am on the view objective embed
WHEN I click on the "Remove" button
THEN the objective will be removed from the list
Subtasks

[ ] Add remove button
[ ] Update tests

Need view command


Add def_one_caller_wrapper

This PR ports from #395 a def_one_caller_wrapper. Function which is a syntax sugar for introducing a Fifo which collect all incoming data and pass them to the one_caller method.
Examples of usage:
https://github.com/kuznia-rdzeni/coreblocks/blob/ddb21b50c9cbc46d154436b3a48a8cdbe323ceeb/coreblocks/fu/vector_unit/v_executor.py#L109
https://github.com/kuznia-rdzeni/coreblocks/blob/ddb21b50c9cbc46d154436b3a48a8cdbe323ceeb/coreblocks/transactions/lib.py#L1444

Do we need this anywhere now? Isn't a function returning a module something weird?

I have the plan to port switching networks from #395 and it is needed there.