Skip to content

Stack trace for allow.cartesian error is ugly #5442

@MichaelChirico

Description

@MichaelChirico
Error in vecseq(f__, len__, if (allow.cartesian || notjoin || !anyDuplicated(f__,  : 
  Join results in 6 rows; more than 5 = nrow(x)+nrow(i). Check for duplicate key values in i each of which join to the same group in x over and over again. If that's ok, try by=.EACHI to run j for each group to avoid the large allocation. If you are sure you wish to proceed, rerun with allow.cartesian=TRUE. Otherwise, please search for this error message in the FAQ, Wiki, Stack Overflow and data.table issue tracker for advice.

Error in vecseq(f__, len__, if (allow.cartesian || notjoin || !anyDuplicated(f__, :

user doesn't need to see that / it adds a lot of distracting noise to the info we present the user.

I'm not aware of a way to set call.=FALSE for errors generated in C with error(), so instead I propose capturing that if() condition in a variable to at least make the error call simpler.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions