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

Source for [InjectSource] cannot be properly recognized for plugins that have overloaded methods. #8

Open
Puchaczov opened this issue Oct 12, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@Puchaczov
Copy link
Owner

Puchaczov commented Oct 12, 2019

let's assume such a query:

select Decompress(AggregateFiles(GetFileInfo()), './Results/DecompressTest') from #disk.zip('./Files.zip')

GetFileInfo() definition can have two overloads, first one FileInfo GetFileInfo([InjectSource] FileInfo) and FileInfo GetFileInfo([InjectSource] ZipArchiveEntry). Based on that, when the compiler sees such a query, it gets the first GetFileInfo() from the methods manager which is wrong. It's because the compiler doesn't have enough information about what kind of source disk.zip(...) returns.

Currently, the compiler should just throws compilation error instead of trying to use wrong method and throw InvalidCastException on runtime.

To Address full resolving of this issue, my proposition is to extend SchemaBase interface to provide such a information during the compilation phase. It looks to be complex to resolve it properly and I feel it addresses the current limitation of evaluator. It will require deeper investigation especially when taken into account queries that use joins, unions and stuff like that.

@Puchaczov Puchaczov added the bug Something isn't working label Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant