+
Skip to content

Conversation

kchanqvq
Copy link
Collaborator

This mostly finishes my plan to improve translate-result: translate-value-case and translate-composite has been rewritten as methods of translate-vector, and the "slow path" method that does type dispatch inside the loop over vector data is eliminated ;)

There are still areas for improvement, e.g. various translate-from-foreign calls, but so far it's good enough for my work and I can eschew hacks in my local-project! Moreover, because translate-vector is now extensible, I can plug in whatever domain specific hack as methods (e.g. I have an unboxed representation of timestamp that works with Petalisp).

@kchanqvq kchanqvq force-pushed the refactor-logical-type branch 2 times, most recently from db69136 to 6b5cb5d Compare May 12, 2025 13:54
@kchanqvq
Copy link
Collaborator Author

Hmm, for some reason query-list test on version prior to DuckDB 1.2.2 is failing. Really weird...

@kchanqvq kchanqvq force-pushed the refactor-logical-type branch from 6b5cb5d to 1f75f09 Compare May 12, 2025 15:50
@kchanqvq
Copy link
Collaborator Author

query-list test on version prior to DuckDB 1.2.2 is failing.

Fixed! Turns out my validity-row-is-valid implementation was wrong, but no test case were catching it, except for old DuckDB version which uses a slightly less efficient way to represent list vectors (validity mask is non-NULL even if all elements are valid). We might want to add some more thorough test for NULL values!

@ak-coram
Copy link
Owner

Thank you for this!

We might want to add some more thorough test for NULL values!

Yes, tests are not nearly comprehensive enough and the benchmarks are also severely lacking. Even so CI already helped me catch a lot of issues (even found a bug in SBCL) and is worth investing in: I'll take a look at how other client libraries do this as there might be some low-hanging fruits here as well.

@ak-coram ak-coram merged commit 20a8d98 into ak-coram:main May 12, 2025
60 of 64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载