Skip to content

Commit

Permalink
fix: ignore empty order by (#392)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobdenOs authored Dec 20, 2023
1 parent 450db36 commit a69fed0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hana/lib/HANAService.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ class HANAService extends SQLService {
const over = { xpr: [] }
// TODO: replace with full path partitioning
if (parent) over.xpr.push(`PARTITION BY ${this.ref({ ref: ['_parent_path_'] })}`)
if (orderBy) over.xpr.push(` ORDER BY ${this.orderBy(orderBy, localized)}`)
if (orderBy?.length) over.xpr.push(` ORDER BY ${this.orderBy(orderBy, localized)}`)
const rn = { xpr: [{ func: 'ROW_NUMBER', args: [] }, 'OVER', over], as: '$$RN$$' }
q.as = q.SELECT.from.as

Expand Down

0 comments on commit a69fed0

Please sign in to comment.