构造内存表:
code = `01`02`03`04`05 col1 = 1 NULL 2 NULL NULL col2 = 1 NULL NULL 3 4 col3 = 3 NULL 3 4 5 col4 = take(double(NULL), 5) t = table(code, col1, col2, col3, col4)
方法1:
colNames = t.schema().colDefs.name vec_cols = colNames[at(!(colNames in [`code]))] t[each(isValid, t[vec_cols]).rowOr()]
方法2:
colNames = t.schema().colDefs.name vec_cols = colNames[at(!(colNames in [`code]))] whereConditions = array(ANY, 0) for(i in vec_cols) { whereConditions.append!(expr(sqlCol(i), ==, NULL)) } sqlDelete(t, whereConditions).eval()