Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail to assign IDs distribution keys in GP #58

Closed
zifeishan opened this issue May 3, 2014 · 2 comments
Closed

Fail to assign IDs distribution keys in GP #58

zifeishan opened this issue May 3, 2014 · 2 comments
Assignees
Labels

Comments

@zifeishan
Copy link
Contributor

Known issue; will occur if we run test.sh with Greenplum:

If "id" column is the distribution key (common when id is the first column), Assigning ID with a sequence will fail.

Can we use Ce's script to update id for greenplum in this case?

@zhangce @feiranwang

[info] PostgresInferenceDataStoreSpec:
[info] Postgres inference data store
[info]   intializing
[info]   - should work
[info]   grounding the factor graph with Boolean variables
[info]   - should work with a one-variable factor rule *** FAILED ***
[info]     org.postgresql.util.PSQLException: ERROR: Cannot parallelize an UPDATE statement that updates the distribution columns
[info]     at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
[info]     at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
[info]     at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
[info]     at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
[info]     at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
[info]     at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410)
[info]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
[info]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
[info]     at scalikejdbc.StatementExecutor$$anonfun$execute$1.apply$mcZ$sp(StatementExecutor.scala:295)
[info]     at scalikejdbc.StatementExecutor$$anonfun$execute$1.apply(StatementExecutor.scala:295)
[info]     ...
[info]   - should work with custom a holdout query *** FAILED ***
[info]     org.postgresql.util.PSQLException: ERROR: Cannot parallelize an UPDATE statement that updates the distribution columns
[info]     at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
[info]     at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
[info]     at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
[info]     at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
[info]     at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
[info]     at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410)
[info]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
[info]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
[info]     at scalikejdbc.StatementExecutor$$anonfun$execute$1.apply$mcZ$sp(StatementExecutor.scala:295)
[info]     at scalikejdbc.StatementExecutor$$anonfun$execute$1.apply(StatementExecutor.scala:295)
[info]     ...
[info]   - should work with weight variables that are null *** FAILED ***
[info]     org.postgresql.util.PSQLException: ERROR: Cannot parallelize an UPDATE statement that updates the distribution columns
[info]     at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
[info]     at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
[info]     at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
[info]     at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
[info]     at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
[info]     at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410)
[info]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
[info]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
[info]     at scalikejdbc.StatementExecutor$$anonfun$execute$1.apply$mcZ$sp(StatementExecutor.scala:295)
[info]     at scalikejdbc.StatementExecutor$$anonfun$execute$1.apply(StatementExecutor.scala:295)
[info]     ...
[info]   - should work with multi-variable factor rules *** FAILED ***
[info]     org.postgresql.util.PSQLException: ERROR: Cannot parallelize an UPDATE statement that updates the distribution columns
[info]     at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
[info]     at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
[info]     at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
[info]     at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
[info]     at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
[info]     at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410)
[info]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
[info]     at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
[info]     at scalikejdbc.StatementExecutor$$anonfun$execute$1.apply$mcZ$sp(StatementExecutor.scala:295)
[info]     at scalikejdbc.StatementExecutor$$anonfun$execute$1.apply(StatementExecutor.scala:295)
[info]     ...
[info] *** 6 TESTS FAILED ***
[error] Failed tests:
[error]     org.deepdive.test.unit.SamplerSpec
[error]     org.deepdive.test.unit.PostgresInferenceDataStoreSpec
[error]     org.deepdive.test.unit.PostgresExtractionDataStoreSpec
[error] (test:test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 52 s, completed May 3, 2014 2:25:53 AM
@feiranwang
Copy link
Contributor

Since id will not be allowed to use by users, the tables should not be distributed by id (this column may be empty). We can tell users not to distribute by id if they are using gp

@feiranwang
Copy link
Contributor

Fixed in f7abdd0

netj added a commit to netj/deepdive that referenced this issue May 8, 2014
netj pushed a commit that referenced this issue Jan 23, 2017
Fixed bug in sampler regarding noise_aware learning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants