caicancai commented on PR #3721: URL: https://github.com/apache/calcite/pull/3721#issuecomment-1986784029
Here you need to convert mapKeyType and mapValueType into the corresponding Biggest Type. According to the initial method, there is definitely no conversion of mapKeyType and mapValueType into the corresponding Biggest Type. Why add an `adjustTypeForMapFunctionConstructor method`? Here I will give an example: ```java map_values(map('foo', 1, 'bar', cast(1 as tinyint))) ``` ![test1](https://github.com/apache/calcite/assets/77189278/6e78dfef-12a8-4a00-a70d-0070e4e14898) When performing node parsing, map('foo', 1, 'bar', cast(1 as tinyint)) will be regarded as a node, that is, `((SqlBasicCall) call.getOperandList().get(0)) `== map('foo', 1, 'bar', cast(1 as tinyint)), I have to typecast mapKeyType and mapValueType via `((SqlBasicCall) call.getOperandList().get(0)).getOperandList()` to get what I want. ![test2](https://github.com/apache/calcite/assets/77189278/9a6cf29d-824a-417a-994c-849b454b88eb) I didn't find the corresponding method, so I wrote a new method -- 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. To unsubscribe, e-mail: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org