superml
superml copied to clipboard
Bug in SuperML BM_25 in SQL Server
Hello, I tried to use BM_25 (R-Version) inside the SQL Server 2022 and I notice a bug.
If I use BM_25 in SQL Server then I got only one column as output (score) but not the corresponding docs.
ALTER PROC reports.PROC_2
as
DECLARE @Rscript NVARCHAR(MAX) = N'
library(superml)
docs <- c("Kaufmann", "test")
sentence <- "Kaufmann"
s <- bm_25(document = sentence, corpus = docs, top_n=10)
OutputDataSet <- as.data.frame(s)
OutputDataSet
' ;
EXEC sp_execute_external_script @language = N'R',
@script = @Rscript
GO
EXEC reports.PROC_2 'Kaufmann'
(No column name)
0,693147180559945
0
If I execute the same code in VS Code then I got two columns (docs, score) as output. Very weird. Do someone understand why this happen?