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

Fix hanging of query when the key in order is an array #43427

Merged
merged 3 commits into from
Oct 2, 2024

Conversation

poorna2152
Copy link
Contributor

Purpose

Describe the problems, issues, or needs driving this feature/fix and include links to related issues.

Fixes #43418

Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@gimantha
Copy link
Contributor

@poorna2152 Shall we add few test cases to oder by fields with type record also?

@@ -502,3 +502,98 @@ function incrementCount(int i) returns int {
int count = i + 2;
return count;
}

function testQueryExprWithOrderByClauseWithArrayKey() {
record {|int[] t; string s;|}[] data1 = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets add few more tests with record type and enum

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not possible to use a record type as a key in the order by clause since it is not a ordered-type. https://ballerina.io/spec/lang/master/#ordering

@gimantha gimantha added the Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. label Sep 27, 2024
Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@8100e00). Learn more about missing BASE report.
Report is 72 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #43427   +/-   ##
=========================================
  Coverage          ?   77.51%           
  Complexity        ?    58594           
=========================================
  Files             ?     3438           
  Lines             ?   219234           
  Branches          ?    28917           
=========================================
  Hits              ?   169934           
  Misses            ?    39880           
  Partials          ?     9420           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gimantha gimantha merged commit fe0509b into ballerina-platform:master Oct 2, 2024
18 checks passed
@gimantha
Copy link
Contributor

gimantha commented Oct 2, 2024

@poorna2152 shall we send the same fix for 2201.10.x and 2201.9.x branch as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Code hangs when using field of type array or tuple in the order by clause of a query
3 participants