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

commit and title not populated properly when using substring #120

Open
fdncred opened this issue Sep 12, 2024 · 2 comments
Open

commit and title not populated properly when using substring #120

fdncred opened this issue Sep 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@fdncred
Copy link

fdncred commented Sep 12, 2024

Describe the bug
I think I've formulated my query properly but the text is being put in the wrong column for some reason.

Example with my prototype nushell plugin. (the information in the "mess" column should be in the title column)

 gitql 'select substring(commit_id,1,7) as commit_id, substring(title,1,15) as title, substring(message,1,20) as mess, author_name, datetime from commits limit 10'
╭─#─┬─commit_id─┬─title─┬─────────mess─────────┬───author_name───┬──datetime──╮
 0                    Improve #12008 UX, c │ Tooster         │ 1726086800 │
 1                    fix path exists on a  Wind             1726076739 
 2                    Config: change ctrl-  Wind             1726076712 
 3                    add `metadata access │ Bahex           │ 1726076646 │
│ 4 │           │       │ Migrating polars com │ Jack Wright     │ 1726075985 │
│ 5 │           │       │ Fix padding issue wi │ Maxim Zhiburt   │ 1726053173 │
│ 6 │           │       │ Bump crate-ci/typos  │ dependabot[bot] │ 1726036546 │
│ 7 │           │       │ Bump hustcer/setup-n │ dependabot[bot] │ 1726036538 │
│ 8 │           │       │ Bump shadow-rs from  │ dependabot[bot] │ 1726036527 │
│ 9 │           │       │ Fix remaining mismat │ Devyn Cairns    │ 1725937386 │
╰─#─┴─commit_id─┴─title─┴─────────mess─────────┴───author_name───┴──datetime──╯

And the same with the gitql cli

 ^gitql -q 'select substring(commit_id,1,7) as commit_id, substring(title,1,15) as title, substring(message,1,20) as mess, author_name, datetime from commits limit 10'
╭───────────┬───────┬──────────────────────┬─────────────────┬─────────────────────────╮
 commit_id  title  mess                  author_name      datetime                
╞═══════════╪═══════╪══════════════════════╪═════════════════╪═════════════════════════╡
                   Improve #12008 UX, c ┆ Tooster         ┆ 2024-09-11 20:33:20.000 │
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
                   fix path exists on a  Wind             2024-09-11 17:45:39.000 
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
                   Config: change ctrl-  Wind             2024-09-11 17:45:12.000 
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
                   add `metadata access ┆ Bahex           ┆ 2024-09-11 17:44:06.000 │
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│           ┆       ┆ Migrating polars com ┆ Jack Wright     ┆ 2024-09-11 17:33:05.000 │
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│           ┆       ┆ Fix padding issue wi ┆ Maxim Zhiburt   ┆ 2024-09-11 11:12:53.000 │
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│           ┆       ┆ Bump crate-ci/typos  ┆ dependabot[bot] ┆ 2024-09-11 06:35:46.000 │
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│           ┆       ┆ Bump hustcer/setup-n ┆ dependabot[bot] ┆ 2024-09-11 06:35:38.000 │
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│           ┆       ┆ Bump shadow-rs from  ┆ dependabot[bot] ┆ 2024-09-11 06:35:27.000 │
├╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│           ┆       ┆ Fix remaining mismat ┆ Devyn Cairns    ┆ 2024-09-10 03:03:06.000 │
╰───────────┴───────┴──────────────────────┴─────────────────┴─────────────────────────╯

But when I only use one column, it seems to work fine.

 gitql 'select substring(commit_id,1,7) from commits limit 10'
╭─#─┬─column_1─╮
 0  1bcceaf  
 1  217eb4e  
 2  78af66f  
 3  f63cecc  
 4  8d60c0d  
 5  0c139c7  
 6  c4bac90  
 7  2ab8751  
 8  d192d85  
 9  6b59066  
╰─#─┴─column_1─╯

GQL (please complete the following information):

  • Version - the latest master branch
@AmrDeveloper
Copy link
Owner

Thank you @fdncred, I will check it

@AmrDeveloper AmrDeveloper added the bug Something isn't working label Sep 12, 2024
@AmrDeveloper
Copy link
Owner

The issue is because as alias as the name of table column, i will check why is that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants