my7ym commented on a change in pull request #1104: [CALCITE-2900]
RewriteRexShuttle generates wrong type during flatten for structured type when
visitInputRef
URL: https://github.com/apache/calcite/pull/1104#discussion_r266269654
##########
File path:
core/src/main/java/org/apache/calcite/sql2rel/RelStructuredTypeFlattener.java
##########
@@ -303,9 +303,11 @@ protected int getNewForOldInput(int oldOrdinal) {
* corresponding field post-flattening, and also returns its type.
*
* @param oldOrdinal Pre-flattening ordinal
+ * @param existingOffset offset already calculated the target column inside
the oldOrdinal column.
+ * For unnested column, it should be 0.
* @return Post-flattening ordinal and type
*/
- protected Ord<RelDataType> getNewFieldForOldInput(int oldOrdinal) {
+ protected Ord<RelDataType> getNewFieldForOldInput(int oldOrdinal, int
existingOffset) {
Review comment:
Hmmm, to your question YES and I did this because in the past it is
protected and it's not a final class. So I could not eliminate the possibility
that somebody subclasses it.
And thanks man you do remind me that I need to keep the original function
signature because someone may subclass it. if there is a @override annotation
then this change is not backward compatible.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services