[GitHub] madlib issue #316: Build: Disable AppendOnly if available

2018-08-29 Thread iyerr3
Github user iyerr3 commented on the issue:

https://github.com/apache/madlib/pull/316
  
Accidently created this PR. This should be ready to review in a couple of 
days. 


---


[GitHub] madlib pull request #316: Build: Disable AppendOnly if available

2018-08-29 Thread iyerr3
GitHub user iyerr3 opened a pull request:

https://github.com/apache/madlib/pull/316

Build: Disable AppendOnly if available



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/madlib/madlib feature/support_ao_storage

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/madlib/pull/316.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #316


commit 5d92943cc639609a0c498692c2416d7f7be201bc
Author: Rahul Iyer 
Date:   2018-08-29T23:23:04Z

Build: Disable AppendOnly if available




---


[GitHub] madlib pull request #315: JIRA:1060 - Modified KNN to accept expressions in ...

2018-08-29 Thread njayaram2
Github user njayaram2 commented on a diff in the pull request:

https://github.com/apache/madlib/pull/315#discussion_r213806554
  
--- Diff: src/ports/postgres/modules/knn/knn.py_in ---
@@ -53,22 +55,10 @@ def knn_validate_src(schema_madlib, point_source, 
point_column_name, point_id,
 
 if label_column_name and label_column_name.strip():
 cols_in_tbl_valid(point_source, [label_column_name], 'kNN')
-cols_in_tbl_valid(point_source, (point_column_name, point_id), 'kNN')
-cols_in_tbl_valid(test_source, (test_column_name, test_id), 'kNN')
-
-if not is_col_array(point_source, point_column_name):
-plpy.error("kNN Error: Feature column '{0}' in train table is not"
-   " an array.".format(point_column_name))
-if not is_col_array(test_source, test_column_name):
-plpy.error("kNN Error: Feature column '{0}' in test table is not"
-   " an array.".format(test_column_name))
-
-if not array_col_has_no_null(point_source, point_column_name):
-plpy.error("kNN Error: Feature column '{0}' in train table has 
some"
-   " NULL values.".format(point_column_name))
-if not array_col_has_no_null(test_source, test_column_name):
-plpy.error("kNN Error: Feature column '{0}' in test table has some"
-   " NULL values.".format(test_column_name))
+
+_assert(point_column_name, "KNN error: Invalid point_column_name 
expression")
+
+_assert(test_column_name, "KNN error: Invalid test_column_name 
expression")
--- End diff --

`KNN` in the error message is different from `kNN` used in other error 
messages (capital `K`). Please keep it consistent as `kNN`.


---


[GitHub] madlib pull request #315: JIRA:1060 - Modified KNN to accept expressions in ...

2018-08-29 Thread njayaram2
Github user njayaram2 commented on a diff in the pull request:

https://github.com/apache/madlib/pull/315#discussion_r213791885
  
--- Diff: src/ports/postgres/modules/knn/knn.py_in ---
@@ -53,22 +55,10 @@ def knn_validate_src(schema_madlib, point_source, 
point_column_name, point_id,
 
 if label_column_name and label_column_name.strip():
 cols_in_tbl_valid(point_source, [label_column_name], 'kNN')
-cols_in_tbl_valid(point_source, (point_column_name, point_id), 'kNN')
-cols_in_tbl_valid(test_source, (test_column_name, test_id), 'kNN')
-
-if not is_col_array(point_source, point_column_name):
-plpy.error("kNN Error: Feature column '{0}' in train table is not"
-   " an array.".format(point_column_name))
-if not is_col_array(test_source, test_column_name):
-plpy.error("kNN Error: Feature column '{0}' in test table is not"
-   " an array.".format(test_column_name))
-
-if not array_col_has_no_null(point_source, point_column_name):
-plpy.error("kNN Error: Feature column '{0}' in train table has 
some"
-   " NULL values.".format(point_column_name))
-if not array_col_has_no_null(test_source, test_column_name):
-plpy.error("kNN Error: Feature column '{0}' in test table has some"
-   " NULL values.".format(test_column_name))
+
+_assert(point_column_name, "KNN error: Invalid point_column_name 
expression")
+
+_assert(test_column_name, "KNN error: Invalid test_column_name 
expression")
--- End diff --

Since the original asserts are removed, this results in the function call 
not exiting gracefully when we have incorrect param values. You may have to use 
function `is_var_valid()` in `validate_args.py_in` to validate 
`point_column_name` and `test_column_name`.


---


[GitHub] madlib pull request #315: JIRA:1060 - Modified KNN to accept expressions in ...

2018-08-29 Thread njayaram2
Github user njayaram2 commented on a diff in the pull request:

https://github.com/apache/madlib/pull/315#discussion_r213792935
  
--- Diff: src/ports/postgres/modules/knn/knn.py_in ---
@@ -264,12 +275,14 @@ def knn(schema_madlib, point_source, 
point_column_name, point_id,
 SELECT test.{test_id} AS {test_id_temp},
 train.{point_id} as train_id,
 {fn_dist}(
-train.{point_column_name},
-test.{test_column_name})
+train.{point_col_name_temp},
+test.{test_col_name_temp})
 AS dist
 {label_out}
-FROM {point_source} AS train,
- {test_source} AS test
+FROM
+ {point_source_temp_table} as train,
+ {test_source_temp_table} as test
--- End diff --

Please use subqueries, instead of tables:
```
(select {point_id} , {point_column_name} as {point_col_name_temp} , 
{label_column_name} from {point_source}) train,
(select {test_id}, {test_column_name} as {test_col_name_temp} from 
{test_source}) test
```


---


Apache MADlib 1.15 Community Call Recording Now Available

2018-08-29 Thread Bob Glithero
Hello All,

Last week's 1.15 deep dive is now available on YouTube for your viewing
pleasure:

https://youtu.be/9JpPWuiqweU
Best regards,
Bob


Bob Glithero | Data Product Marketing
Pivotal, Inc.
rglith...@pivotal.io | m: 415.483.5220