The Huawei P20 Pro comes with a 40-megapixel main camera. Although this camera is capable for using Huawei's "Pixel Fusion" (essentially 2x2 pixel binning) to result in 10MP high-quality low-light shots, when shooting at 40MP, the image quality in dim light won't be that good.
The reason for it that each pixel measured 1-micron, which is not good for low-light situations as each pixel holds small amount of light data and therefore much more image noise.
However, it can deliver very detailed quality images. I did spend time analyzing the image quality of P20 Pro sample images on Anandtech.com website. The 40MP low-light images were very noisy with paint-like look to it. Even looking at a scaled downed version of it like 1000 pixel wide, it still looked quite bad, but usable for web sharing.
So overall, the small 1-micron pixels do negatively affect the image quality when shooting under dim conditions, but it does give you VERY detailed images when shooting in daylight. The high-quality Leica optics help here and you can see that the 40MP camera is capable of capturing very fine details. Visit Anadtech and try to enlarge the daylight 40MP sample image and see it for yourself.