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

[CALCITE-6115] Interval type specifier with zero fractional second precision does not pass validation #3563

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

LeonidChistov
Copy link
Contributor

No description provided.

@LeonidChistov LeonidChistov force-pushed the calcite-6115 branch 2 times, most recently from 061d74d to e7f63c3 Compare December 7, 2023 09:52
@@ -143,6 +143,10 @@ public static void checkActualAndReferenceFiles() {
sql("select interval mgr hour as h from emp").ok();
}

@Test void testIntervalSecondNoFractionalPart() {
Copy link
Contributor

Choose a reason for hiding this comment

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

it is customary to add a comment with the JIRA issue that is being solved.
Please follow the other examples in this file that start with "Test case for".
Note that everything is important, including the last period.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, fixed.

@mihaibudiu
Copy link
Contributor

I am not a SQL expert, but if other dialects accept this, I think it's good.

@LeonidChistov
Copy link
Contributor Author

@mihaibudiu

What exactly do you mean regarding SQL dialects support? Since Calcite is a framework for building RDBMS query optimizers, I think it make sense for it to support this feature described in SQL standard, even if some databases would not support it.
It is always possible to add custom checks that would prohibit zero fractional precision, but if it is prohibited on framework level, there is no easy way to disable these checks if you try to build SQL-standard compliant RDBMS.

Copy link

sonarcloud bot commented Dec 13, 2023

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
No data about Coverage
80.0% Duplication on New Code

See analysis details on SonarCloud

@LeonidChistov
Copy link
Contributor Author

@mihaibudiu

Thanks a lot for review. BTW, do you have a power to trigger Slow Tests run? Looks like it doesn't run by default.

@mihaibudiu
Copy link
Contributor

I am not aware of the Calcite CI running slow tests. I don't know how to do it.

@libenchao
Copy link
Member

@LeonidChistov @mihaibudiu The slow tests are trigger by adding a label "slow-tests-needed", see here:

linux-slow:
# Run slow tests when the commit is on main or it is requested explicitly by adding an
# appropriate label in the PR
if: github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'slow-tests-needed')

@LeonidChistov
Copy link
Contributor Author

@libenchao Thanks. Do I understand correctly that this test run is not required (in general) to merge a PR?

@asolimando
Copy link
Member

@libenchao Thanks. Do I understand correctly that this test run is not required (in general) to merge a PR?

They are not, but they will be run when the PR is merged, for changes to core functions that can have a broad impact I'd say it's recommended, in order to catch issues early on without waiting for the main branch to break.

What is a "core function" is a fuzzy definition though, you can look for the @Tag("slow") tag to get a sense of that is covered by slow tests (even though, the scope is pretty broad).

If anyone has some more precise recommendations on this topic, I guess it would be a great addition to the developer's guide on the website.

@LeonidChistov
Copy link
Contributor Author

@asolimando thanks a lot for explanation.

Could someone help now with merging the PR?

@asolimando asolimando merged commit e4bd21e into apache:main Dec 14, 2023
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants