petervandivier / PsAdxArchiver

Generic exporter from Azure Data Explorer to an external table in Azure blob storage.
MIT License
1 stars 0 forks source link

`New-XbBatchBounds` should always return an array #8

Open petervandivier opened 1 year ago

petervandivier commented 1 year ago

Following f0baaed8dd4303a504ab04ef913cbb5a3e2efa30 (v0.0.3), we support non-contiguous batch bounds. When constructing a non-contiguous batch, you may start with a single object.

Does not work currently

$bounds = New-XbBatchBounds -Start '2023-01-01' -End '2023-01-02' -Step "1.00:00:00"
$bounds += New-XbBatchBounds -Start '2023-02-01' -End '2023-03-01' -Step "1.00:00:00"

InvalidOperation: Method invocation failed because [System.Management.Automation.PSObject] does not contain a method named 'op_Addition'.

Need to force singleton response from New-XbBatchBounds to be an array.