Problem/Motivation

SQL Server fails the test Drupal\KernelTests\Core\Entity\EntityQueryAggregateTest::testAggregation(), because it needs to do something special for the aggregate function avg. It changes the query from SELECT avg([entity_test].[id]) AS [id_avg] to SELECT avg(([entity_test].[id]) * 1.0) AS [id_avg]. We are running a regular expression test to see if the change is correct and the change for SQL Server makes it fail the test.

Proposed resolution

Change the expected pattern a little, so that the test also passes for SQL Server.

Remaining tasks

TBD

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

daffie created an issue. See original summary.

daffie’s picture

Beakerboy’s picture

Status: Needs review » Reviewed & tested by the community

This test was introduced in D9.1, so this patch could be easily applied to 9.1 and 9.2. Since it is a testing-only patch, there will be no effect on users.

Beakerboy’s picture

Issue summary: View changes

fixed the "from" code.

alexpott’s picture

Version: 9.3.x-dev » 9.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed a4b97b7406 to 9.3.x and 28327b1136 to 9.2.x. Thanks!

Backported to 9.2.x since this is test only.

  • alexpott committed a4b97b7 on 9.3.x
    Issue #3244156 by daffie: Update the Drupal\KernelTests\Core\Entity\...

  • alexpott committed 28327b1 on 9.2.x
    Issue #3244156 by daffie: Update the Drupal\KernelTests\Core\Entity\...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.