You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "emilsivervik (via GitHub)" <gi...@apache.org> on 2024/10/11 14:21:26 UTC

[PR] feat: handle different placing of type names [datafusion-sqlparser-rs]

emilsivervik opened a new pull request, #1470:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1470

   Hey, 
   
   First of all I just want to thank for all the awesome work on this library!
   
   I've came across something that didn't work as expected a couple of months ago and created a fix for myself but now took the time to bring it here also. I'm sure there are some things left to do so I would appreciate some rubber-🦆 
   
   The issue is when trying to parse create a create statement
   
   
   ```
   // Working
   CREATE TABLE tb (id INT, KEY USING HASH (id))
   ```
   ```
   // Not working
   CREATE TABLE tb (id INT, KEY (id) USING HASH)
   ```
   
   There was also an issue using order on the keys, such as this
   ```
   CREATE TABLE tb (id INT, KEY USING HASH (id ASC))
   ```
   which I'm not entirely sure how you'd like to handle, from my side I just did what was the appropriate solution (not using it) but I'd imagine from your end that would not be ideal solution. 


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: handle different placing of type names [datafusion-sqlparser-rs]

Posted by "coveralls (via GitHub)" <gi...@apache.org>.
coveralls commented on PR #1470:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1470#issuecomment-2417333904

   ## Pull Request Test Coverage Report for [Build 11294154244](https://coveralls.io/builds/70369897)
   
   ### Warning: This coverage report may be inaccurate.
   
   This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
   
   - For more information on this, see <a target="_blank" href="https://docs.coveralls.io/build-types#tracking-coverage-changes-with-pull_request-builds">Tracking coverage changes with pull request builds</a>.
   - To avoid this issue with future PRs, see these <a target="_blank" href="https://docs.coveralls.io/build-types#recommended-ci-configurations">Recommended CI Configurations</a>.
   - For a quick fix, <a target="_blank" href="https://github.blog/changelog/2022-02-03-more-ways-to-keep-your-pull-request-branch-up-to-date/#update-your-pull-request-branch-by-rebasing">rebase this PR at GitHub</a>. Your next report should be accurate.
   
   ### Details
   
   * **44** of **45**   **(97.78%)**  changed or added relevant lines in **2** files are covered.
   * No unchanged relevant lines lost coverage.
   * Overall coverage increased (+**0.01%**) to **89.325%**
   
   ---
   
   |  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
   | :-----|--------------|--------|---: |
   | [src/parser/mod.rs](https://coveralls.io/builds/70369897/source?filename=src%2Fparser%2Fmod.rs#L12835) | 40 | 41 | 97.56%
   <!-- | **Total:** | **44** | **45** | **97.78%** | -->
   
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/70369897/badge)](https://coveralls.io/builds/70369897) |
   | :-- | --: |
   | Change from base [Build 11263581007](https://coveralls.io/builds/70258511): |  0.01% |
   | Covered Lines: | 30181 |
   | Relevant Lines: | 33788 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: handle different placing of type names [datafusion-sqlparser-rs]

Posted by "iffyio (via GitHub)" <gi...@apache.org>.
iffyio commented on PR #1470:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1470#issuecomment-2460143031

   Marking this as draft in the meantime as we're no longer waiting on a review.
   @emilsivervik please feel free to undraft and ping when you want us to take another look!


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: handle different placing of type names [datafusion-sqlparser-rs]

Posted by "iffyio (via GitHub)" <gi...@apache.org>.
iffyio commented on PR #1470:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1470#issuecomment-2410443601

   Hi @emilsivervik Sure! Could you take a look at the [CLUSTERED INDEX impl](https://github.com/apache/datafusion-sqlparser-rs/blob/6cfa42c3bd0a7f1d084af001b99845e05ea3b5da/src/parser/mod.rs#L6781-L6786) which has similar syntax and likely solution for parsing and representing the `(id ASC)` type scenarios?
   I'm thinking we'd probably be able to reuse that type, for example if we extend the `IndexType` parsing and representation to include:
   
   ```rust
   pub enum IndexType {
       BTree(Option<Vec<ClusteredIndex>>),
       Hash(Option<Vec<ClusteredIndex>>),
   }
   ```
   And then something similar for the KEY support. Let me know if you have any questions.
   
   Also, from the tests I'm assuming this is a mysql syntax? could you include a link to the docs maybe in the PR description where this syntax is described?
   


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: handle different placing of type names [datafusion-sqlparser-rs]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #1470:
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1470#issuecomment-2572020421

   Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] feat: handle different placing of type names [datafusion-sqlparser-rs]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #1470: feat: handle different placing of type names
URL: https://github.com/apache/datafusion-sqlparser-rs/pull/1470


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org