Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opt: M1 Macs produce different result for normalization rule cycle tests #83512

Closed
mgartner opened this issue Jun 28, 2022 · 1 comment
Closed
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team

Comments

@mgartner
Copy link
Collaborator

mgartner commented Jun 28, 2022

On M1 Macs, this test has a different output:

https://github.com/cockroachdb/cockroach/blob/5ffe3c531385bbf52e5a414addbc489279f3d535/pkg/sql/opt/norm/testdata/rules/cycle

  # This test ensures that a rule cycle does not cause a stack overflow. In test
  # builds, a deep constructor call stack is detected and the Factory panics.
  exprnorm
  (NormCycleTestRel (True))
  ----
- error: optimizer factory constructor call stack exceeded max depth of 10000
+ values
+  ├── cardinality: [0 - 0]
+  └── key: ()

I'm not exactly sure how this test is executed differently on M1 Macs. Is some rule firing before NormCycleTestRel that prevents the infinite recursion from starting? Is the M1 somehow recognizing the infinite recursion and arbitrarily halting it?

See: https://reviewable.io/reviews/cockroachdb/cockroach/82877#-N5av5HC3Gp5QuRAfQAL

Jira issue: CRDB-17115

@mgartner mgartner added the C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) label Jun 28, 2022
@blathers-crl blathers-crl bot added the T-sql-queries SQL Queries Team label Jun 28, 2022
@mgartner
Copy link
Collaborator Author

@healthy-pod confirmed that this is no longer an issue. Closing.

@mgartner mgartner moved this to Done in SQL Queries Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-sql-queries SQL Queries Team
Projects
Archived in project
Development

No branches or pull requests

1 participant