Skip to content

Conversation

@Xhoenix
Copy link
Member

@Xhoenix Xhoenix commented Oct 28, 2024

No description provided.

@Xhoenix
Copy link
Member Author

Xhoenix commented Oct 28, 2024

Does the logical operators need to be moved too?

Copy link
Member

@fzipi fzipi left a comment

Choose a reason for hiding this comment

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

Very good question. What do you think is better?

Comment on lines 15 to 17
##! sql operators

[|&<>*\/%=^+-]{1,3}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
##! sql operators
[|&<>*\/%=^+-]{1,3}
##!> include sql-operators

Copy link
Member

Choose a reason for hiding this comment

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

Why do we have there the *, % and ^ chars? Are those valid part of the sql language operators 🤔 ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Those characters are causing tests to fail. Which is why I revert my initial commit.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, if you read a little above, a url points to the same SQLITE operators page I mentioned earlier.

Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like those are valid operators for MySQL: https://dev.mysql.com/doc/refman/8.4/en/non-typed-operators.html

Copy link
Member Author

@Xhoenix Xhoenix Oct 30, 2024

Choose a reason for hiding this comment

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

Looks like we've to add *, ^, %, |, +, - to fix the tests for 942520. What do you say, should we add them alongwith other MySQL operators? Will adding single chars cause FPs?

Copy link
Member Author

@Xhoenix Xhoenix Oct 30, 2024

Choose a reason for hiding this comment

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

Also, the main question is should we include the logical operators too. I think we should, including logical operators for other engines too. But then, what about 942120.ra? Only the include statement will be left. 😄

Copy link
Member Author

Choose a reason for hiding this comment

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

@fzipi I had to remove some tests to fix the regression tests error. Is it okay with you, as some of those operators are for mysql?

@theseion
Copy link
Contributor

I'm not convinced that moving these operators to an include file makes much sense. It's a very small set of tokens that can be shared between only a few rules. In addition, the include syntax isn't flexible enough to write expressions with a range expression (it's possible but not straight forward), like [|&><]{2,3}. To me, the downsides will outweigh the downside of redundancy in this particular case.

@Xhoenix
Copy link
Member Author

Xhoenix commented Jan 1, 2025

@theseion I decided later to not move rest of the operators, but fzipi still had to reply my question. @fzipi what is your opinion on what @theseion said.

Xhoenix and others added 2 commits January 2, 2025 13:06
Co-authored-by: Felipe Zipitría <3012076+fzipi@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2025

📊 Quantitative test results for language: eng, year: 2023, size: 10K, paranoia level: 1:
🚀 Quantitative testing did not detect new false positives

@Xhoenix Xhoenix requested a review from a team January 8, 2025 05:47
@theseion
Copy link
Contributor

Ping @fzipi

@fzipi
Copy link
Member

fzipi commented Jan 12, 2025

Sure, let's not move then and keep it here.

@fzipi
Copy link
Member

fzipi commented Jan 12, 2025

Sorry for wasting your time @Xhoenix 😞

@fzipi fzipi closed this Jan 12, 2025
@Xhoenix Xhoenix deleted the move-sql-operators-to-include-file branch January 12, 2025 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants