Skip to content

Commit

Permalink
Fix sybase sql test
Browse files Browse the repository at this point in the history
  • Loading branch information
gs-jp1 authored Sep 27, 2024
1 parent 4dc7ba8 commit 6cce0c9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function <<test.Test>> meta::relational::tests::functions::sqlstring::sybase::te
function <<test.Test>> meta::relational::tests::functions::sqlstring::sybase::testToSqlGenerationFirstDayOfThisYear():Boolean[1]
{
let expected = [
pair(DatabaseType.Sybase, 'select dateadd(DAY, -(datepart(dayofyear, today()) - 1), today()) as "date" from tradeTable as "root"')
pair(DatabaseType.Sybase, 'select dateadd(DAY, -(datepart(dayofyear, current_date()) - 1), current_date()) as "date" from tradeTable as "root"')
];

$expected->map(p|
Expand All @@ -154,5 +154,5 @@ function <<test.Test>> meta::relational::tests::functions::sqlstring::sybase::te

function <<test.Test>> meta::relational::tests::functions::sqlstring::sybase::testToSqlGenerationFirstDayOfQuarter_Sybase():Boolean[1]
{
testToSqlGenerationFirstDayOfQuarter(DatabaseType.Sybase, 'select dateadd(QUARTER, quarter("root".tradeDate) - 1, dateadd(DAY, -(datepart(dayofyear, "root".tradeDate) - 1), "root".tradeDate)) as "date" from tradeTable as "root"');
testToSqlGenerationFirstDayOfQuarter(DatabaseType.Sybase, 'select dateadd(QUARTER, datepart(QQ, "root".tradeDate) - 1, dateadd(DAY, -(datepart(dayofyear, "root".tradeDate) - 1), "root".tradeDate)) as "date" from tradeTable as "root"');
}

0 comments on commit 6cce0c9

Please sign in to comment.