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

Problem: Kwil's Go Client returned cannot encode type uuid.UUID on Execute #296

Closed
1 task done
Tracked by #137
MicBun opened this issue Jun 3, 2024 · 3 comments
Closed
1 task done
Tracked by #137
Assignees
Labels
blocks type: bug Something isn't working

Comments

@MicBun
Copy link
Contributor

MicBun commented Jun 3, 2024

Hi @brennanjl, @KwilLuke.

I happen to encounter this error when trying to push records using Execute. Looks like triggered by this line:
https://github.com/kwilteam/kwil-db/blob/main/core/types/transactions/payloads.go#L395
Looks like uuid.UUID is counted differently from types.UUID hence it goes to default case.

Kunaiform used: https://github.com/truflation/tsn-data-provider/blob/cd065402c72a7d3332da3b0fa3eecd1afb7f5670/internal/migration/contracts/primitive_stream_new.kf

Error happened:
https://github.com/truflation/tsn-data-provider/blob/fd4ac326d07b357940cdcec0b66935510b8b6044/internal/dataproviderserver/infra/repo.go#L68

kwil-db version used: taken from kwilteam/kwil-db#787

image

Block

@MicBun MicBun mentioned this issue Jun 3, 2024
66 tasks
@MicBun MicBun added type: bug Something isn't working blocks labels Jun 3, 2024
@brennanjl
Copy link
Collaborator

Thanks, will take a look

@brennanjl
Copy link
Collaborator

This is not a bug. You are trying to use an unknown UUID type from the package "github.com/google/uuid". Kwil provides a UUID type that is almost identical to Google's: github.com/kwilteam/kwil-db/core/types.UUID. You should be able to just take the current UUID you are using, get the 16 bytes, and wrap it with Kwil's type.

@MicBun
Copy link
Contributor Author

MicBun commented Jun 3, 2024

This is not a bug. You are trying to use an unknown UUID type from the package "github.com/google/uuid". Kwil provides a UUID type that is almost identical to Google's: github.com/kwilteam/kwil-db/core/types.UUID. You should be able to just take the current UUID you are using, get the 16 bytes, and wrap it with Kwil's type.

Oh, I see it then, yes, it is almost identical.

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

No branches or pull requests

3 participants