Skip to content

Commit

Permalink
fix: add is_null for scalar types in testcase grammar (#779)
Browse files Browse the repository at this point in the history
  • Loading branch information
scgkiran authored Feb 5, 2025
1 parent 975b2cc commit a30b3e2
Show file tree
Hide file tree
Showing 4 changed files with 611 additions and 359 deletions.
36 changes: 18 additions & 18 deletions grammar/FuncTestCaseParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -132,76 +132,76 @@ floatLiteral

nullArg: NullLiteral DoubleColon dataType;

intArg: IntegerLiteral DoubleColon (I8 | I16 | I32 | I64);
intArg: IntegerLiteral DoubleColon (I8 | I16 | I32 | I64) isnull=QMark?;

floatArg: numericLiteral DoubleColon (FP32 | FP64);
floatArg: numericLiteral DoubleColon (FP32 | FP64) isnull=QMark?;

decimalArg
: numericLiteral DoubleColon decimalType
: numericLiteral DoubleColon decimalType isnull=QMark?
;

booleanArg
: BooleanLiteral DoubleColon booleanType
: BooleanLiteral DoubleColon booleanType isnull=QMark?
;

stringArg
: StringLiteral DoubleColon stringType
: StringLiteral DoubleColon stringType isnull=QMark?
;

dateArg
: DateLiteral DoubleColon Date
: DateLiteral DoubleColon Date isnull=QMark?
;

timeArg
: TimeLiteral DoubleColon Time
: TimeLiteral DoubleColon Time isnull=QMark?
;

timestampArg
: TimestampLiteral DoubleColon timestampType
: TimestampLiteral DoubleColon timestampType isnull=QMark?
;

timestampTzArg
: TimestampTzLiteral DoubleColon timestampTZType
: TimestampTzLiteral DoubleColon timestampTZType isnull=QMark?
;

intervalYearArg
: IntervalYearLiteral DoubleColon intervalYearType
: IntervalYearLiteral DoubleColon intervalYearType isnull=QMark?
;

intervalDayArg
: IntervalDayLiteral DoubleColon intervalDayType
: IntervalDayLiteral DoubleColon intervalDayType isnull=QMark?
;

fixedCharArg
: StringLiteral DoubleColon fixedCharType
: StringLiteral DoubleColon fixedCharType isnull=QMark?
;

varCharArg
: StringLiteral DoubleColon varCharType
: StringLiteral DoubleColon varCharType isnull=QMark?
;

fixedBinaryArg
: StringLiteral DoubleColon fixedBinaryType
: StringLiteral DoubleColon fixedBinaryType isnull=QMark?
;

precisionTimestampArg
: TimestampLiteral DoubleColon precisionTimestampType
: TimestampLiteral DoubleColon precisionTimestampType isnull=QMark?
;

precisionTimestampTZArg
: TimestampTzLiteral DoubleColon precisionTimestampTZType
: TimestampTzLiteral DoubleColon precisionTimestampTZType isnull=QMark?
;

listArg
: literalList DoubleColon listType
: literalList DoubleColon listType isnull=QMark?
;

literalList
: OBracket (literal (Comma literal)*)? CBracket
;

dataType
: scalarType
: scalarType isnull=QMark?
| parameterizedType
;

Expand Down
2 changes: 1 addition & 1 deletion tests/cases/arithmetic_decimal/bitwise_or.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ bitwise_or(31766::dec<5, 0>, 900::dec<3, 0>) = 32662::dec<5, 0>
bitwise_or(-31766::dec<5, 0>, 900::dec<3, 0>) = -31762::dec<5, 0>
bitwise_or(2147483647::dec<10, 0>, 123456789::dec<9, 0>) = 2147483647::dec<10, 0>
bitwise_or(-2147483647::dec<10, 0>, 123456789::dec<9, 0>) = -2024026859::dec<10, 0>
bitwise_or(9223372036854775807::dec<19, 0>, 127::dec<3, 0>) = 9223372036854775807::dec<10, 0>
bitwise_or(9223372036854775807::dec<19, 0>, 127::dec<3, 0>) = 9223372036854775807::dec<19, 0>
bitwise_or(-9223372036854775807::dec<19, 0>, 127::dec<3, 0>) = -9223372036854775681::dec<19, 0>

# max_values: test with max values
Expand Down
Loading

0 comments on commit a30b3e2

Please sign in to comment.