twalthr commented on a change in pull request #6815: [FLINK-7062][cep][table]
Added basic support for MATCH_RECOGNIZE
URL: https://github.com/apache/flink/pull/6815#discussion_r225879546
##########
File path:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/codegen/MatchCodeGenerator.scala
##########
@@ -118,14 +145,19 @@ class MatchCodeGenerator(
GeneratedFunction(funcName, returnType, funcCode)
}
- def generatePartitionKeyAccess(
+ /**
+ * Extracts partition keys from any element of the match
+ *
+ * @param partitionKey partition key to be extracted
+ * @return generated code for the given key
+ */
+ private def generatePartitionKeyAccess(
partitionKey: RexInputRef
) : GeneratedExpression = {
- // extracts partition keys from any element of the match
val eventNameTerm = newName("event")
val eventTypeTerm = boxedTypeTermForTypeInfo(input)
- val keyAccess = generateFieldAccess(input, eventNameTerm,
partitionKey.getIndex)
+ val keyAccess = generateNullableInputFieldAccess(input, eventNameTerm,
partitionKey.getIndex)
Review comment:
Can the input be nullable? Otherwise we can use a different method that does
not check for null.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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