Conversion Nuances¶
In certain scenarios, it may not be feasible or pragmatic to transform code in a manner that ensures the identical output in the target dialect as in the source code.
The primary objective of Alchemist is to enhance the overall efficiency of the migration process and subsequent usage and maintenance. To strike the right balance between precision in conversion and the quality of the resulting code, we employ two key approaches:
-
Optional Opt-In Conversion to a Runtime Function: Alchemist offers the choice to opt-in for a conversion to a runtime function, such as Spark UDF. This option conceals the intricacies of the underlying code, simplifying the transition.
-
Deliberate Deviation from Exact Conversion: In some instances, Alchemist intentionally refrains from achieving an exact conversion. This strategic choice is made to prioritize simplicity and the generation of more idiomatic code in the target dialect. When such cases arise, Alchemist will issue a warning message to inform the user of this divergence.
This section of the documentation elaborates on these nuances and categorizes them based on the combination of source and target dialects.