Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

unable to cast <nil> of type <nil> to float64 #759

Closed
ajnavarro opened this issue Jun 20, 2019 · 2 comments · Fixed by #760
Closed

unable to cast <nil> of type <nil> to float64 #759

ajnavarro opened this issue Jun 20, 2019 · 2 comments · Fixed by #760
Assignees
Labels
bug Something isn't working

Comments

@ajnavarro
Copy link
Contributor

This error is happening on this query:

SELECT
    added,
    deleted,
    commit_author_when,
    commit_hash,
    repository_id,
    CASE WHEN deleted < (added+deleted)*0.1 THEN 'Added' WHEN added < (added+deleted)*0.1 THEN 'Deleted' ELSE 'Changed' END AS commit_type
FROM (
        SELECT 
            JSON_EXTRACT(stats, "$.Total.Additions") as added,  
            JSON_EXTRACT(stats, "$.Total.Deletions") as deleted, 
            commit_author_when, 
            commit_hash,
            repository_id
        FROM (
            SELECT 
                repository_id,
                commit_author_when,
                commit_hash,
                commit_stats(repository_id, commit_hash) as stats 
            FROM refs 
            natural join ref_commits 
            natural join commits 
            --where refs.ref_name="HEAD"
        ) q
) q2;
@erizocosmico
Copy link
Contributor

erizocosmico commented Jun 20, 2019

Can't reproduce on master, can you provide a list of repositories to reproduces this?

@erizocosmico erizocosmico self-assigned this Jun 20, 2019
@ajnavarro
Copy link
Contributor Author

ajnavarro commented Jun 20, 2019

I was able to reproduce the error with a simpler query: SELECT (NULL+1)

@ajnavarro ajnavarro transferred this issue from src-d/gitbase Jun 20, 2019
@erizocosmico erizocosmico added the bug Something isn't working label Jun 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants