-
Notifications
You must be signed in to change notification settings - Fork 58
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
PHOENIX-5619 CREATE TABLE AS SELECT for Phoenix table doesn't work co… #11
Conversation
@brfrn169 can you please add a test case for this? |
@chrajeshbabu Thank you for reviewing it! I'm trying to add a test case for this to the integration test, but I could't run the integration test correctly. I ran the following command in phoenix-hive directory, but it looks like it didn't work correctly: Could you please suggest how to run the integration test correctly or appropriate documentation? |
a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor requests to just explain the code-change a little more. A test case would also be great.
Sorry for the delay in getting here, Toshi.
config.set(PhoenixStorageHandlerConstants.PHOENIX_COLUMN_MAPPING, mapping); | ||
} | ||
|
||
String tableName = tbl.getProperty(PhoenixStorageHandlerConstants.PHOENIX_TABLE_NAME); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a comment as to why this change is needed for future readers? I'm guessing that Configuration is coming from the Hive framework, but the Properties is what the user actually provided to us?
phoenix-hive/src/main/java/org/apache/phoenix/hive/PhoenixSerializer.java
Show resolved
Hide resolved
@joshelser Thank you for reviewing it! I'll modify the PR for your review.
Actually, I already tried this but any integration tests didn't run. So I tried The integration tests are broken? |
I knew that the one IT has been broken since the migration into a new repo, but it is news to me if they're all broken. |
624948f
to
e862cfe
Compare
I tried to add an integration test for this but I couldn't reproduce the issue by using So, let me explain the details of the issue here. I added the code to populate from the table properties into config in And, in Because |
I remember the semantics of hive connectors depending largely on how they're called. That is, the mapreduce execution engine could hit a remarkably different code path than the tez engine. Maybe the same is the case with the test util? If you are stuck and can't get a test showing the issue, I am OK committing this as it is. |
Thank you @joshelser . I'm stuck and can't get a test showing the issue actually. Please commit this if you are okay with the patch. I tested it locally and it resolved the issue. |
…rrectly in Hive