Skip to content

Comments

Add cache_options#589

Merged
adamreeve merged 9 commits intoG-Research:masterfrom
haianhng31:cache_options
Nov 13, 2025
Merged

Add cache_options#589
adamreeve merged 9 commits intoG-Research:masterfrom
haianhng31:cache_options

Conversation

@haianhng31
Copy link
Contributor

No description provided.

@haianhng31 haianhng31 marked this pull request as ready for review November 12, 2025 17:33
private static extern IntPtr ArrowReaderProperties_SetArrowExtensionEnabled(IntPtr readerProperties, bool extensionsEnabled);

[DllImport(ParquetDll.Name)]
private static extern IntPtr ArrowReaderProperties_GetCacheOptions(IntPtr readerProperties, out ParquetSharp.CacheOption cacheOptions);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit surprised this works without setting a [StructLayout(LayoutKind.Sequential)] attribute on the CacheOption type. In general, we probably can't rely on the layout used by .NET matching the layout used by C++ so this isn't safe. I think it would probably be simplest to do something similar to the SetCacheOptions method and get the various members of the options separately.

Copy link
Contributor

@adamreeve adamreeve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks @haianhng31!

@adamreeve adamreeve merged commit a9a3557 into G-Research:master Nov 13, 2025
47 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