You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "KonarzewskiP (via GitHub)" <gi...@apache.org> on 2024/03/16 11:55:25 UTC
[PR] Support parsing SQL Server SELECT state_desc sql (#29188) [shardingsphere]
KonarzewskiP opened a new pull request, #30510:
URL: https://github.com/apache/shardingsphere/pull/30510
Fixes #29188.
Changes proposed in this pull request:
- add test case to cover scenario:
```sql
SELECT state_desc
, file_type_desc
, COUNT(*) AS [count]
, SUM(CASE
WHEN state = 5 AND file_type=0 THEN 128*1024*1024
WHEN state = 5 AND file_type=1 THEN 8*1024*1024
WHEN state IN (6,7) THEN 68*1024*1024
ELSE file_size_in_bytes
END) / 1024 / 1024 AS [on-disk size MB]
FROM sys.dm_db_xtp_checkpoint_files
GROUP BY state, state_desc, file_type, file_type_desc
ORDER BY state, file_type
```
- The following test case was covered in this [PR](https://github.com/apache/shardingsphere/pull/30258)
```sql
SELECT PersonName, Friends
FROM (
SELECT
Person1.name AS PersonName,
STRING_AGG(Person2.name, '->') WITHIN GROUP (GRAPH PATH) AS Friends,
LAST_VALUE(Person2.name) WITHIN GROUP (GRAPH PATH) AS LastNode
FROM
Person AS Person1,
friendOf FOR PATH AS fo,
Person FOR PATH AS Person2
WHERE MATCH(SHORTEST_PATH(Person1(-(fo)->Person2)+))
AND Person1.name = 'Jacob'
) AS Q
WHERE Q.LastNode = 'Alice'
```
---
Before committing this PR, I'm sure that I have checked the following options:
- [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [x] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [x] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [x] I have added corresponding unit tests for my changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support parsing SQL Server SELECT state_desc sql (#29188) [shardingsphere]
Posted by "KonarzewskiP (via GitHub)" <gi...@apache.org>.
KonarzewskiP commented on PR #30510:
URL: https://github.com/apache/shardingsphere/pull/30510#issuecomment-2001967751
Hi @strongduanmu
When you have time please add label and have a look at my PR. Thanks!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support parsing SQL Server SELECT state_desc sql (#29188) [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu closed pull request #30510: Support parsing SQL Server SELECT state_desc sql (#29188)
URL: https://github.com/apache/shardingsphere/pull/30510
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support parsing SQL Server SELECT state_desc sql (#29188) [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on PR #30510:
URL: https://github.com/apache/shardingsphere/pull/30510#issuecomment-2022793623
Since this PR does not change any g4 or visitor logic, it can be considered that these cases are already supported. I will close this PR and welcome other issues.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Support parsing SQL Server SELECT state_desc sql (#29188) [shardingsphere]
Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on code in PR #30510:
URL: https://github.com/apache/shardingsphere/pull/30510#discussion_r1527364373
##########
test/it/parser/src/main/resources/case/dml/select-expression.xml:
##########
@@ -3178,4 +3178,48 @@
</expression-projection>
</projections>
</select>
+
+ <select sql-case-id="select_with_case_when_group_by_order_by">
Review Comment:
Does this PR not involve any changes to G4 or visit logic? In other words, the SQL on the issue is already supported, in this case, we just need to leave a message on the issue, and the community volunteer will close the issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org