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

Dialect conversion #19

Open
westonpace opened this issue Jan 16, 2024 · 0 comments
Open

Dialect conversion #19

westonpace opened this issue Jan 16, 2024 · 0 comments

Comments

@westonpace
Copy link
Owner

Most producers and consumers today ignore the idea of function options. Instead, most consumers implicitly have certain expected behaviors. For example, when adding numbers, datafusion will always return an error on overflow. The BFT project aims to capture these differences. We could use the dialect files from BFT to create a module that does the following:

Given an input expression that may or may not have options specified generate a more accurate expression for a given dialect by filling in the function options. For example, given an expression with a bare "add" function and the "datafusion" dialect generate an expression where the "add" function has the overflow option set to error.

And also

Given an input expression that has options specified and a target dialect, identify the ways in which the expression will not conform to that dialect. For example, given an expression with an "add" function whose overflow is set to "saturate" and a target dialect of "datafusion", generate an error reporting that the function would not run as expected because of that add function.

These tools provide the foundations for a user-guided dialect conversion process. First, bind some input expression to their source dialect. Then detect the differences between the source dialect and the destination dialect. Then, allow the human user to either ignore those differences or come up with some kind of alternative.

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

No branches or pull requests

1 participant