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

HIVE-22010 - Clean up ShowCreateTableOperation #732

Merged
merged 1 commit into from
Jul 25, 2019

Conversation

miklosgergely
Copy link
Contributor

Also fixed small checkstyle issues and removed unused codes from some other ddl files.

@jcamachor jcamachor self-assigned this Jul 22, 2019
@@ -186,6 +186,8 @@ static void internalBeforeClassSetup(Map<String, String> additionalProperties, b
});

MetaStoreTestUtils.startMetaStoreWithRetry(hconf);
// re set the WAREHOUSE property to the test dir, as the previous command added a random port to it
hconf.set(MetastoreConf.ConfVars.WAREHOUSE.getVarname(), System.getProperty("test.warehouse.dir", "/tmp"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume we expect the property to exist hence /tmp would not make a difference?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it wouldn't in theory, still the class already references this property 4 times before this change, twice specifying /tmp as fallback value, twice not. I thought that we should be consistent, and it can't hurt to have it there so I put it here, and also fixed the missing one in line 3273 - but missed to do so in the 4th occasion at line 3293. So we can have it at all occasions,, or remove it from all, just be consistent. What do you suggest?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistency is good idd... We can include tmp it in all occurrences.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, fixed.

@@ -50,20 +53,26 @@
import org.apache.hive.common.util.HiveStringUtils;
import org.stringtemplate.v4.ST;

import com.google.common.collect.ImmutableSet;

import avro.shaded.com.google.common.collect.Sets;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably you did not want to use the shaded guava here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks fixed.

createTabCommand.append("CREATE <" + TEMPORARY + "><" + EXTERNAL + ">TABLE `");
createTabCommand.append(desc.getTableName() + "`(\n");
createTabCommand.append("<" + LIST_COLUMNS + ">)\n");
createTabCommand.append("<" + TBL_COMMENT + ">\n");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we have removed some of the information we were printing, e.g., TBL_COMMENT or TBL_LOCATION. Is this because they will be included in the table properties?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are still there, just removed the unnecessary TBL_ prefix - they are all for the table :)

@miklosgergely miklosgergely force-pushed the HIVE-22010 branch 4 times, most recently from e1e4ec9 to a60679c Compare July 25, 2019 09:33
@miklosgergely
Copy link
Contributor Author

Rebased after recent chnages + fixed checkstyle issue.

@miklosgergely miklosgergely merged commit 68ae4a5 into apache:master Jul 25, 2019
@miklosgergely miklosgergely deleted the HIVE-22010 branch November 27, 2019 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants