QiangCai commented on a change in pull request #3862: URL: https://github.com/apache/carbondata/pull/3862#discussion_r475298980 ########## File path: integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonSessionCatalogUtil.scala ########## @@ -61,21 +61,6 @@ object CarbonSessionCatalogUtil { s"'dbName'='${ newTableIdentifier.database.get }', 'tablePath'='${ newTablePath }')") } - /** - * Below method will be used to update serde properties - * @param tableIdentifier table identifier - * @param schemaParts schema parts - * @param cols cols - */ - def alterTable(tableIdentifier: TableIdentifier, - schemaParts: String, - cols: Option[Seq[ColumnSchema]], - sparkSession: SparkSession): Unit = { - getClient(sparkSession) - .runSqlHive(s"ALTER TABLE `${tableIdentifier.database.get}`.`${tableIdentifier.table}` " + - s"SET TBLPROPERTIES($schemaParts)") Review comment: if we do not change it, will spark/hive update it? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] |
In reply to this post by GitBox
QiangCai commented on a change in pull request #3862: URL: https://github.com/apache/carbondata/pull/3862#discussion_r475301804 ########## File path: integration/spark/src/test/scala/org/apache/spark/carbondata/restructure/AlterTableRevertTestCase.scala ########## @@ -30,6 +32,13 @@ import org.apache.carbondata.spark.exception.ProcessMetaDataException class AlterTableRevertTestCase extends QueryTest with BeforeAndAfterAll { override def beforeAll() { + new MockUp[MockClassForAlterRevertTests]() { Review comment: can we mock up the static method directly? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] |
In reply to this post by GitBox
akashrn5 commented on a change in pull request #3862: URL: https://github.com/apache/carbondata/pull/3862#discussion_r475336497 ########## File path: integration/spark/src/main/scala/org/apache/spark/sql/hive/CarbonSessionCatalogUtil.scala ########## @@ -61,21 +61,6 @@ object CarbonSessionCatalogUtil { s"'dbName'='${ newTableIdentifier.database.get }', 'tablePath'='${ newTablePath }')") } - /** - * Below method will be used to update serde properties - * @param tableIdentifier table identifier - * @param schemaParts schema parts - * @param cols cols - */ - def alterTable(tableIdentifier: TableIdentifier, - schemaParts: String, - cols: Option[Seq[ColumnSchema]], - sparkSession: SparkSession): Unit = { - getClient(sparkSession) - .runSqlHive(s"ALTER TABLE `${tableIdentifier.database.get}`.`${tableIdentifier.table}` " + - s"SET TBLPROPERTIES($schemaParts)") Review comment: yes, we are calling the API `org.apache.spark.sql.hive.CarbonSessionUtil#alterExternalCatalogForTableWithUpdatedSchema` which does for us. All the alter tests are passing if you see. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] |
In reply to this post by GitBox
akashrn5 commented on a change in pull request #3862: URL: https://github.com/apache/carbondata/pull/3862#discussion_r475336910 ########## File path: integration/spark/src/test/scala/org/apache/spark/carbondata/restructure/AlterTableRevertTestCase.scala ########## @@ -30,6 +32,13 @@ import org.apache.carbondata.spark.exception.ProcessMetaDataException class AlterTableRevertTestCase extends QueryTest with BeforeAndAfterAll { override def beforeAll() { + new MockUp[MockClassForAlterRevertTests]() { Review comment: i checked for static methods, but all were defined in scala object not class, so i thought i can do this way. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] |
In reply to this post by GitBox
QiangCai commented on a change in pull request #3862: URL: https://github.com/apache/carbondata/pull/3862#discussion_r475347003 ########## File path: integration/spark/src/test/scala/org/apache/spark/carbondata/restructure/AlterTableRevertTestCase.scala ########## @@ -30,6 +32,13 @@ import org.apache.carbondata.spark.exception.ProcessMetaDataException class AlterTableRevertTestCase extends QueryTest with BeforeAndAfterAll { override def beforeAll() { + new MockUp[MockClassForAlterRevertTests]() { Review comment: for scala, The class is CarbonSessionCatalogUtil$. The method name is updateCatalogTableForAlter. It is private, but not a static method. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] |
In reply to this post by GitBox
akashrn5 commented on a change in pull request #3862: URL: https://github.com/apache/carbondata/pull/3862#discussion_r475353691 ########## File path: integration/spark/src/test/scala/org/apache/spark/carbondata/restructure/AlterTableRevertTestCase.scala ########## @@ -30,6 +32,13 @@ import org.apache.carbondata.spark.exception.ProcessMetaDataException class AlterTableRevertTestCase extends QueryTest with BeforeAndAfterAll { override def beforeAll() { + new MockUp[MockClassForAlterRevertTests]() { Review comment: yeah, i tried that, but since im using MockUp[T], it needs actual scala class name, not the object, as MockUp identifies class, so i followed this similarly by referring the `TableStatusBackupTest` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] |
In reply to this post by GitBox
akashrn5 commented on a change in pull request #3862: URL: https://github.com/apache/carbondata/pull/3862#discussion_r475390842 ########## File path: integration/spark/src/test/scala/org/apache/spark/carbondata/restructure/AlterTableRevertTestCase.scala ########## @@ -30,6 +32,13 @@ import org.apache.carbondata.spark.exception.ProcessMetaDataException class AlterTableRevertTestCase extends QueryTest with BeforeAndAfterAll { override def beforeAll() { + new MockUp[MockClassForAlterRevertTests]() { Review comment: @QiangCai Since CarbonSessionCatalogUtil is a singleton object in scala, we cant mock its method directly, so i think this should be fine right for now? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] |
In reply to this post by GitBox
QiangCai commented on a change in pull request #3862: URL: https://github.com/apache/carbondata/pull/3862#discussion_r475413812 ########## File path: integration/spark/src/test/scala/org/apache/spark/carbondata/restructure/AlterTableRevertTestCase.scala ########## @@ -30,6 +32,13 @@ import org.apache.carbondata.spark.exception.ProcessMetaDataException class AlterTableRevertTestCase extends QueryTest with BeforeAndAfterAll { override def beforeAll() { + new MockUp[MockClassForAlterRevertTests]() { Review comment: ok ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] |
In reply to this post by GitBox
kunal642 commented on pull request #3862: URL: https://github.com/apache/carbondata/pull/3862#issuecomment-679065415 LGTM ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] |
In reply to this post by GitBox
asfgit closed pull request #3862: URL: https://github.com/apache/carbondata/pull/3862 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [hidden email] |
Free forum by Nabble | Edit this page |