MaxGekk commented on code in PR #37986:
URL: https://github.com/apache/spark/pull/37986#discussion_r979293197
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -421,7 +454,12 @@ sealed abstract class FrameLessOffsetWindowFunction
if (check.isFailure) {
check
} else if (!offset.foldable) {
- TypeCheckFailure(s"Offset expression '$offset' must be a literal.")
+ DataTypeMismatch(
+ errorSubClass = "FRAME_LESS_OFFSET_WITHOUT_FOLDABLE",
+ messageParameters = Map(
+ "offset" -> s"$offset"
Review Comment:
Since offset is an expression, please, wrap it by toSQLExpr()
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -65,24 +65,31 @@ case class WindowSpecDefinition(
override def checkInputDataTypes(): TypeCheckResult = {
frameSpecification match {
case UnspecifiedFrame =>
- TypeCheckFailure(
- "Cannot use an UnspecifiedFrame. This should have been converted
during analysis. " +
- "Please file a bug report.")
+ DataTypeMismatch(
+ errorSubClass = "UNSPECIFIED_FRAME"
+ )
case f: SpecifiedWindowFrame if f.frameType == RangeFrame &&
!f.isUnbounded &&
orderSpec.isEmpty =>
- TypeCheckFailure(
- "A range window frame cannot be used in an unordered window
specification.")
+ DataTypeMismatch(
+ errorSubClass = "RANGE_FRAME_WITHOUT_ORDER"
+ )
case f: SpecifiedWindowFrame if f.frameType == RangeFrame &&
f.isValueBound &&
orderSpec.size > 1 =>
- TypeCheckFailure(
- s"A range window frame with value boundaries cannot be used in a
window specification " +
- s"with multiple order by expressions: ${orderSpec.mkString(",")}")
+ DataTypeMismatch(
+ errorSubClass = "RANGE_FRAME_MULTI_ORDER",
+ messageParameters = Map(
+ "orderSpec" -> s"${orderSpec.mkString(",")}"
+ )
+ )
case f: SpecifiedWindowFrame if f.frameType == RangeFrame &&
f.isValueBound &&
!isValidFrameType(f.valueBoundary.head.dataType) =>
- TypeCheckFailure(
- s"The data type '${orderSpec.head.dataType.catalogString}' used in
the order " +
- "specification does not match the data type " +
- s"'${f.valueBoundary.head.dataType.catalogString}' which is used
in the range frame.")
+ DataTypeMismatch(
+ errorSubClass = "RANGE_FRAME_INVALID_TYPE",
+ messageParameters = Map(
+ "orderSpecType" -> s"${orderSpec.head.dataType.catalogString}",
+ "valueBoundaryType" ->
s"${f.valueBoundary.head.dataType.catalogString}"
Review Comment:
The same, toSQLType
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -65,24 +65,31 @@ case class WindowSpecDefinition(
override def checkInputDataTypes(): TypeCheckResult = {
frameSpecification match {
case UnspecifiedFrame =>
- TypeCheckFailure(
- "Cannot use an UnspecifiedFrame. This should have been converted
during analysis. " +
- "Please file a bug report.")
+ DataTypeMismatch(
+ errorSubClass = "UNSPECIFIED_FRAME"
+ )
Review Comment:
```suggestion
DataTypeMismatch(errorSubClass = "UNSPECIFIED_FRAME")
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -262,11 +284,22 @@ case class SpecifiedWindowFrame(
private def checkBoundary(b: Expression, location: String): TypeCheckResult
= b match {
case _: SpecialFrameBoundary => TypeCheckSuccess
case e: Expression if !e.foldable =>
- TypeCheckFailure(s"Window frame $location bound '$e' is not a literal.")
+ DataTypeMismatch(
+ errorSubClass = "SPECIFIED_WINDOW_FRAME_WITHOUT_FOLDABLE",
+ messageParameters = Map(
+ "location" -> s"$location",
+ "expression" -> s"$e"
Review Comment:
Use toSQLExpr()
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -262,11 +284,22 @@ case class SpecifiedWindowFrame(
private def checkBoundary(b: Expression, location: String): TypeCheckResult
= b match {
case _: SpecialFrameBoundary => TypeCheckSuccess
case e: Expression if !e.foldable =>
- TypeCheckFailure(s"Window frame $location bound '$e' is not a literal.")
+ DataTypeMismatch(
+ errorSubClass = "SPECIFIED_WINDOW_FRAME_WITHOUT_FOLDABLE",
+ messageParameters = Map(
+ "location" -> s"$location",
+ "expression" -> s"$e"
+ )
+ )
case e: Expression if !frameType.inputType.acceptsType(e.dataType) =>
- TypeCheckFailure(
- s"The data type of the $location bound '${e.dataType.catalogString}'
does not match " +
- s"the expected data type '${frameType.inputType.simpleString}'.")
+ DataTypeMismatch(
+ errorSubClass = "SPECIFIED_WINDOW_FRAME_UNACCEPTED_TYPE",
+ messageParameters = Map(
+ "location" -> s"$location",
+ "exprType" -> s"${e.dataType.catalogString}",
+ "expectedType" -> s"${frameType.inputType.simpleString}"
Review Comment:
Please, use toSQLType
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -138,11 +143,59 @@
"all arguments must be strings."
]
},
+ "RANGE_FRAME_INVALID_TYPE" : {
+ "message" : [
+ "The data type '<orderSpecType>' used in the order specification
does not match ",
+ "the data type '<valueBoundaryType>' which is used in the range
frame."
+ ]
+ },
+ "RANGE_FRAME_MULTI_ORDER" : {
+ "message" : [
+ "A range window frame with value boundaries cannot be used in a
window specification ",
+ "with multiple order by expressions: <orderSpec>."
+ ]
+ },
+ "RANGE_FRAME_WITHOUT_ORDER" : {
+ "message" : [
+ "A range window frame cannot be used in an unordered window
specification."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_DIFF_TYPES" : {
+ "message" : [
+ "Window frame bounds '<lower>' and '<upper>' do not have the same
type: '<lowerType>' <> '<upperType>'"
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_INVALID_BOUND" : {
+ "message" : [
+ "Window frame upper bound '<upper>' does not follow the lower bound
'<lower>'."
Review Comment:
```suggestion
"Window frame upper bound <upper> does not follow the lower bound
<lower>."
```
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -138,11 +143,59 @@
"all arguments must be strings."
]
},
+ "RANGE_FRAME_INVALID_TYPE" : {
+ "message" : [
+ "The data type '<orderSpecType>' used in the order specification
does not match ",
+ "the data type '<valueBoundaryType>' which is used in the range
frame."
+ ]
+ },
+ "RANGE_FRAME_MULTI_ORDER" : {
+ "message" : [
+ "A range window frame with value boundaries cannot be used in a
window specification ",
+ "with multiple order by expressions: <orderSpec>."
+ ]
+ },
+ "RANGE_FRAME_WITHOUT_ORDER" : {
+ "message" : [
+ "A range window frame cannot be used in an unordered window
specification."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_DIFF_TYPES" : {
+ "message" : [
+ "Window frame bounds '<lower>' and '<upper>' do not have the same
type: '<lowerType>' <> '<upperType>'"
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_INVALID_BOUND" : {
+ "message" : [
+ "Window frame upper bound '<upper>' does not follow the lower bound
'<lower>'."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_UNACCEPTED_TYPE" : {
+ "message" : [
+ "The data type of the <location> bound '<exprType>' does not match
the expected data type '<expectedType>'."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_WITHOUT_FOLDABLE" : {
+ "message" : [
+ "Window frame <location> bound '<expression>' is not a literal."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_WRONG_COMPARISON" : {
+ "message" : [
+ "The lower bound of a window frame must be <comparison> to the upper
bound"
+ ]
+ },
"UNEXPECTED_INPUT_TYPE" : {
"message" : [
"parameter <paramIndex> requires <requiredType> type, however,
<inputSql> is of <inputType> type."
]
},
+ "UNSPECIFIED_FRAME" : {
+ "message" : [
+ "cannot use an UnspecifiedFrame.",
+ "This should have been converted during analysis."
Review Comment:
```suggestion
"Cannot use an UnspecifiedFrame. This should have been converted
during analysis."
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCheckResult.scala:
##########
@@ -51,7 +51,7 @@ object TypeCheckResult {
*/
case class DataTypeMismatch(
errorSubClass: String,
- messageParameters: Map[String, String])
+ messageParameters: Map[String, String] = Map())
Review Comment:
nit:
```suggestion
messageParameters: Map[String, String] = Map.empty)
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -65,24 +65,31 @@ case class WindowSpecDefinition(
override def checkInputDataTypes(): TypeCheckResult = {
frameSpecification match {
case UnspecifiedFrame =>
- TypeCheckFailure(
- "Cannot use an UnspecifiedFrame. This should have been converted
during analysis. " +
- "Please file a bug report.")
+ DataTypeMismatch(
+ errorSubClass = "UNSPECIFIED_FRAME"
+ )
case f: SpecifiedWindowFrame if f.frameType == RangeFrame &&
!f.isUnbounded &&
orderSpec.isEmpty =>
- TypeCheckFailure(
- "A range window frame cannot be used in an unordered window
specification.")
+ DataTypeMismatch(
+ errorSubClass = "RANGE_FRAME_WITHOUT_ORDER"
+ )
case f: SpecifiedWindowFrame if f.frameType == RangeFrame &&
f.isValueBound &&
orderSpec.size > 1 =>
- TypeCheckFailure(
- s"A range window frame with value boundaries cannot be used in a
window specification " +
- s"with multiple order by expressions: ${orderSpec.mkString(",")}")
+ DataTypeMismatch(
+ errorSubClass = "RANGE_FRAME_MULTI_ORDER",
+ messageParameters = Map(
+ "orderSpec" -> s"${orderSpec.mkString(",")}"
Review Comment:
```suggestion
"orderSpec" -> orderSpec.mkString(",")
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -65,24 +65,31 @@ case class WindowSpecDefinition(
override def checkInputDataTypes(): TypeCheckResult = {
frameSpecification match {
case UnspecifiedFrame =>
- TypeCheckFailure(
- "Cannot use an UnspecifiedFrame. This should have been converted
during analysis. " +
- "Please file a bug report.")
+ DataTypeMismatch(
+ errorSubClass = "UNSPECIFIED_FRAME"
+ )
case f: SpecifiedWindowFrame if f.frameType == RangeFrame &&
!f.isUnbounded &&
orderSpec.isEmpty =>
- TypeCheckFailure(
- "A range window frame cannot be used in an unordered window
specification.")
+ DataTypeMismatch(
+ errorSubClass = "RANGE_FRAME_WITHOUT_ORDER"
+ )
Review Comment:
```suggestion
DataTypeMismatch(errorSubClass = "RANGE_FRAME_WITHOUT_ORDER")
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -65,24 +65,31 @@ case class WindowSpecDefinition(
override def checkInputDataTypes(): TypeCheckResult = {
frameSpecification match {
case UnspecifiedFrame =>
- TypeCheckFailure(
- "Cannot use an UnspecifiedFrame. This should have been converted
during analysis. " +
- "Please file a bug report.")
+ DataTypeMismatch(
+ errorSubClass = "UNSPECIFIED_FRAME"
+ )
case f: SpecifiedWindowFrame if f.frameType == RangeFrame &&
!f.isUnbounded &&
orderSpec.isEmpty =>
- TypeCheckFailure(
- "A range window frame cannot be used in an unordered window
specification.")
+ DataTypeMismatch(
+ errorSubClass = "RANGE_FRAME_WITHOUT_ORDER"
+ )
case f: SpecifiedWindowFrame if f.frameType == RangeFrame &&
f.isValueBound &&
orderSpec.size > 1 =>
- TypeCheckFailure(
- s"A range window frame with value boundaries cannot be used in a
window specification " +
- s"with multiple order by expressions: ${orderSpec.mkString(",")}")
+ DataTypeMismatch(
+ errorSubClass = "RANGE_FRAME_MULTI_ORDER",
+ messageParameters = Map(
+ "orderSpec" -> s"${orderSpec.mkString(",")}"
+ )
+ )
case f: SpecifiedWindowFrame if f.frameType == RangeFrame &&
f.isValueBound &&
!isValidFrameType(f.valueBoundary.head.dataType) =>
- TypeCheckFailure(
- s"The data type '${orderSpec.head.dataType.catalogString}' used in
the order " +
- "specification does not match the data type " +
- s"'${f.valueBoundary.head.dataType.catalogString}' which is used
in the range frame.")
+ DataTypeMismatch(
+ errorSubClass = "RANGE_FRAME_INVALID_TYPE",
+ messageParameters = Map(
+ "orderSpecType" -> s"${orderSpec.head.dataType.catalogString}",
Review Comment:
Could you wrap the datatype by toSQLType()
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -215,17 +222,32 @@ case class SpecifiedWindowFrame(
// Check combination (of expressions).
(lower, upper) match {
case (l: Expression, u: Expression) if !isValidFrameBoundary(l, u) =>
- TypeCheckFailure(s"Window frame upper bound '$upper' does not follow
the lower bound " +
- s"'$lower'.")
+ DataTypeMismatch(
+ errorSubClass = "SPECIFIED_WINDOW_FRAME_INVALID_BOUND",
+ messageParameters = Map(
+ "upper" -> s"$upper",
+ "lower" -> s"${lower}"
Review Comment:
Use toSQLExpr(), please.
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -138,11 +143,59 @@
"all arguments must be strings."
]
},
+ "RANGE_FRAME_INVALID_TYPE" : {
+ "message" : [
+ "The data type '<orderSpecType>' used in the order specification
does not match ",
+ "the data type '<valueBoundaryType>' which is used in the range
frame."
+ ]
+ },
+ "RANGE_FRAME_MULTI_ORDER" : {
+ "message" : [
+ "A range window frame with value boundaries cannot be used in a
window specification ",
+ "with multiple order by expressions: <orderSpec>."
+ ]
+ },
+ "RANGE_FRAME_WITHOUT_ORDER" : {
+ "message" : [
+ "A range window frame cannot be used in an unordered window
specification."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_DIFF_TYPES" : {
+ "message" : [
+ "Window frame bounds '<lower>' and '<upper>' do not have the same
type: '<lowerType>' <> '<upperType>'"
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_INVALID_BOUND" : {
+ "message" : [
+ "Window frame upper bound '<upper>' does not follow the lower bound
'<lower>'."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_UNACCEPTED_TYPE" : {
+ "message" : [
+ "The data type of the <location> bound '<exprType>' does not match
the expected data type '<expectedType>'."
Review Comment:
```suggestion
"The data type of the <location> bound <exprType> does not match
the expected data type <expectedType>."
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -215,17 +222,32 @@ case class SpecifiedWindowFrame(
// Check combination (of expressions).
(lower, upper) match {
case (l: Expression, u: Expression) if !isValidFrameBoundary(l, u) =>
- TypeCheckFailure(s"Window frame upper bound '$upper' does not follow
the lower bound " +
- s"'$lower'.")
+ DataTypeMismatch(
+ errorSubClass = "SPECIFIED_WINDOW_FRAME_INVALID_BOUND",
+ messageParameters = Map(
+ "upper" -> s"$upper",
+ "lower" -> s"${lower}"
+ )
+ )
case (l: SpecialFrameBoundary, _) => TypeCheckSuccess
case (_, u: SpecialFrameBoundary) => TypeCheckSuccess
case (l: Expression, u: Expression) if l.dataType != u.dataType =>
- TypeCheckFailure(
- s"Window frame bounds '$lower' and '$upper' do no not have the same
data type: " +
- s"'${l.dataType.catalogString}' <> '${u.dataType.catalogString}'")
+ DataTypeMismatch(
+ errorSubClass = "SPECIFIED_WINDOW_FRAME_DIFF_TYPES",
+ messageParameters = Map(
+ "lower" -> s"$lower",
+ "upper" -> s"$upper",
+ "lowerType" -> s"${l.dataType.catalogString}",
+ "upperType" -> s"${u.dataType.catalogString}"
Review Comment:
Use toSQLExpr and toSQLType
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -262,11 +284,22 @@ case class SpecifiedWindowFrame(
private def checkBoundary(b: Expression, location: String): TypeCheckResult
= b match {
case _: SpecialFrameBoundary => TypeCheckSuccess
case e: Expression if !e.foldable =>
- TypeCheckFailure(s"Window frame $location bound '$e' is not a literal.")
+ DataTypeMismatch(
+ errorSubClass = "SPECIFIED_WINDOW_FRAME_WITHOUT_FOLDABLE",
+ messageParameters = Map(
+ "location" -> s"$location",
Review Comment:
```suggestion
"location" -> location,
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala:
##########
@@ -262,11 +284,22 @@ case class SpecifiedWindowFrame(
private def checkBoundary(b: Expression, location: String): TypeCheckResult
= b match {
case _: SpecialFrameBoundary => TypeCheckSuccess
case e: Expression if !e.foldable =>
- TypeCheckFailure(s"Window frame $location bound '$e' is not a literal.")
+ DataTypeMismatch(
+ errorSubClass = "SPECIFIED_WINDOW_FRAME_WITHOUT_FOLDABLE",
+ messageParameters = Map(
+ "location" -> s"$location",
+ "expression" -> s"$e"
+ )
+ )
case e: Expression if !frameType.inputType.acceptsType(e.dataType) =>
- TypeCheckFailure(
- s"The data type of the $location bound '${e.dataType.catalogString}'
does not match " +
- s"the expected data type '${frameType.inputType.simpleString}'.")
+ DataTypeMismatch(
+ errorSubClass = "SPECIFIED_WINDOW_FRAME_UNACCEPTED_TYPE",
+ messageParameters = Map(
+ "location" -> s"$location",
Review Comment:
```suggestion
"location" -> location,
```
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -138,11 +143,59 @@
"all arguments must be strings."
]
},
+ "RANGE_FRAME_INVALID_TYPE" : {
+ "message" : [
+ "The data type '<orderSpecType>' used in the order specification
does not match ",
+ "the data type '<valueBoundaryType>' which is used in the range
frame."
Review Comment:
```suggestion
"The data type '<orderSpecType>' used in the order specification
does not match the data type '<valueBoundaryType>' which is used in the range
frame."
```
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -138,11 +143,59 @@
"all arguments must be strings."
]
},
+ "RANGE_FRAME_INVALID_TYPE" : {
+ "message" : [
+ "The data type '<orderSpecType>' used in the order specification
does not match ",
+ "the data type '<valueBoundaryType>' which is used in the range
frame."
+ ]
+ },
+ "RANGE_FRAME_MULTI_ORDER" : {
+ "message" : [
+ "A range window frame with value boundaries cannot be used in a
window specification ",
+ "with multiple order by expressions: <orderSpec>."
+ ]
+ },
+ "RANGE_FRAME_WITHOUT_ORDER" : {
+ "message" : [
+ "A range window frame cannot be used in an unordered window
specification."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_DIFF_TYPES" : {
+ "message" : [
+ "Window frame bounds '<lower>' and '<upper>' do not have the same
type: '<lowerType>' <> '<upperType>'"
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_INVALID_BOUND" : {
+ "message" : [
+ "Window frame upper bound '<upper>' does not follow the lower bound
'<lower>'."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_UNACCEPTED_TYPE" : {
+ "message" : [
+ "The data type of the <location> bound '<exprType>' does not match
the expected data type '<expectedType>'."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_WITHOUT_FOLDABLE" : {
+ "message" : [
+ "Window frame <location> bound '<expression>' is not a literal."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_WRONG_COMPARISON" : {
+ "message" : [
+ "The lower bound of a window frame must be <comparison> to the upper
bound"
Review Comment:
```suggestion
"The lower bound of a window frame must be <comparison> to the
upper bound."
```
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -138,11 +143,59 @@
"all arguments must be strings."
]
},
+ "RANGE_FRAME_INVALID_TYPE" : {
+ "message" : [
+ "The data type '<orderSpecType>' used in the order specification
does not match ",
+ "the data type '<valueBoundaryType>' which is used in the range
frame."
+ ]
+ },
+ "RANGE_FRAME_MULTI_ORDER" : {
+ "message" : [
+ "A range window frame with value boundaries cannot be used in a
window specification ",
+ "with multiple order by expressions: <orderSpec>."
+ ]
+ },
+ "RANGE_FRAME_WITHOUT_ORDER" : {
+ "message" : [
+ "A range window frame cannot be used in an unordered window
specification."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_DIFF_TYPES" : {
+ "message" : [
+ "Window frame bounds '<lower>' and '<upper>' do not have the same
type: '<lowerType>' <> '<upperType>'"
Review Comment:
```suggestion
"Window frame bounds '<lower>' and '<upper>' do not have the same
type: '<lowerType>' <> '<upperType>'."
```
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -138,11 +143,59 @@
"all arguments must be strings."
]
},
+ "RANGE_FRAME_INVALID_TYPE" : {
+ "message" : [
+ "The data type '<orderSpecType>' used in the order specification
does not match ",
+ "the data type '<valueBoundaryType>' which is used in the range
frame."
+ ]
+ },
+ "RANGE_FRAME_MULTI_ORDER" : {
+ "message" : [
+ "A range window frame with value boundaries cannot be used in a
window specification ",
+ "with multiple order by expressions: <orderSpec>."
+ ]
+ },
+ "RANGE_FRAME_WITHOUT_ORDER" : {
+ "message" : [
+ "A range window frame cannot be used in an unordered window
specification."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_DIFF_TYPES" : {
+ "message" : [
+ "Window frame bounds '<lower>' and '<upper>' do not have the same
type: '<lowerType>' <> '<upperType>'"
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_INVALID_BOUND" : {
+ "message" : [
+ "Window frame upper bound '<upper>' does not follow the lower bound
'<lower>'."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_UNACCEPTED_TYPE" : {
+ "message" : [
+ "The data type of the <location> bound '<exprType>' does not match
the expected data type '<expectedType>'."
+ ]
+ },
+ "SPECIFIED_WINDOW_FRAME_WITHOUT_FOLDABLE" : {
+ "message" : [
+ "Window frame <location> bound '<expression>' is not a literal."
Review Comment:
```suggestion
"Window frame <location> bound <expression> is not a literal."
```
##########
core/src/main/resources/error/error-classes.json:
##########
@@ -138,11 +143,59 @@
"all arguments must be strings."
]
},
+ "RANGE_FRAME_INVALID_TYPE" : {
+ "message" : [
+ "The data type '<orderSpecType>' used in the order specification
does not match ",
+ "the data type '<valueBoundaryType>' which is used in the range
frame."
+ ]
+ },
+ "RANGE_FRAME_MULTI_ORDER" : {
+ "message" : [
+ "A range window frame with value boundaries cannot be used in a
window specification ",
+ "with multiple order by expressions: <orderSpec>."
Review Comment:
```suggestion
"A range window frame with value boundaries cannot be used in a
window specification with multiple order by expressions: <orderSpec>."
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]