oap-project / gazelle_plugin

Native SQL Engine plugin for Spark SQL with vectorized SIMD optimizations.
Apache License 2.0
256 stars 77 forks source link

Compilation failed with castBIGINTOrNull in SMJ conditions #1132

Open jackylee-ch opened 1 year ago

jackylee-ch commented 1 year ago

Describe the bug We meet this problem when there is a castBIGINTOrNull in SMJ conditions and WSCG is false.

return input_field_validity_1_4 && input_field_validity_0_3 && (input_field_1_4 < input_field_0_3);
                                                                ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
                                                                |                |
                                                                |                int64_t {aka long int}
                                                                std::string {aka std::basic_string<char>}

To Reproduce

Expected behavior No Exception thrown.

Additional context It seems that we still use CodeGenNodeVisitor to generate codes, which does not works well with case function. Maybe we can use ExpressionCodegenVisitor instead?