You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2020/01/11 10:38:42 UTC
[GitHub] [carbondata] QiangCai opened a new pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
QiangCai opened a new pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574
### Why is this PR needed?
1. not support mv
2. Parser still use CarbonAstBuidler
3. still use carbonsession to run some testcases
### What changes were proposed in this PR?
1. support mv
2. new order of parsers (CarbonParser->SparkParser)
3. remove spark-carbon-common-test module, move test back to spark-common-test module
4. ...
### Does this PR introduce any user interface change?
- No
- Yes. (please explain the change and update document)
### Is any new testcase added?
- No
- Yes
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-576008017
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1692/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] QiangCai commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
QiangCai commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r367866479
##########
File path: pom.xml
##########
@@ -103,7 +103,6 @@
<module>integration/spark-datasource</module>
<module>integration/spark2</module>
<module>integration/spark-common-test</module>
- <module>integration/spark-carbon-common-test</module>
Review comment:
yes
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] QiangCai commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
QiangCai commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r367884022
##########
File path: core/src/main/java/org/apache/carbondata/core/metadata/schema/table/DatabaseDMSchemaStorageProvider.java
##########
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.carbondata.core.metadata.schema.table;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.carbondata.common.exceptions.sql.NoSuchDataMapException;
+
+/**
+ * Stores datamap schema in database
+ */
+public class DatabaseDMSchemaStorageProvider implements DataMapSchemaStorageProvider {
Review comment:
yes, now it is an interface only, but we can implement it in the future
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] jackylk commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
jackylk commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r365581470
##########
File path: core/src/main/java/org/apache/carbondata/core/metadata/DatabaseLocationProvider.java
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.carbondata.core.metadata;
+
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.util.CarbonProperties;
+
+public abstract class DatabaseLocationProvider {
Review comment:
add comment for this class
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-575618648
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1679/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] jackylk commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
jackylk commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r365581648
##########
File path: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonCreateTableCommand.scala
##########
@@ -140,11 +140,31 @@ case class CarbonCreateTableCommand(
s"Dictionary include cannot be applied on partition columns")
}
s" PARTITIONED BY (${partitionInfo.getColumnSchemaList.asScala.map(
- _.getColumnName).mkString(",")})"
+ _.getColumnName.toLowerCase).mkString(",")})"
} else {
""
}
+ val repeatedPropKeys =
Review comment:
add comment to describe the logic here
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] asfgit closed pull request #3574: [CARBONDATA-3503]
Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-575988147
Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1690/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] jackylk commented on issue #3574: [CARBONDATA-3503]
Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
jackylk commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-576021770
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-575968428
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1687/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] QiangCai commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
QiangCai commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r367880746
##########
File path: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonCreateTableCommand.scala
##########
@@ -140,11 +140,31 @@ case class CarbonCreateTableCommand(
s"Dictionary include cannot be applied on partition columns")
}
s" PARTITIONED BY (${partitionInfo.getColumnSchemaList.asScala.map(
- _.getColumnName).mkString(",")})"
+ _.getColumnName.toLowerCase).mkString(",")})"
} else {
""
}
+ val repeatedPropKeys =
Review comment:
done
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-573309170
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1598/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-573377016
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1608/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] jackylk commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
jackylk commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r365581850
##########
File path: integration/spark2/src/main/scala/org/apache/spark/sql/parser/CarbonExtensionSpark2SqlParser.scala
##########
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.parser
+
+import scala.language.implicitConversions
+
+import org.apache.spark.sql.catalyst.plans.logical._
+import org.apache.spark.sql.catalyst.CarbonParserUtil
+import org.apache.spark.sql.execution.command._
+import org.apache.spark.sql.execution.command.management.CarbonLoadDataCommand
+import org.apache.spark.sql.execution.command.schema.{CarbonAlterTableAddColumnCommand, CarbonAlterTableColRenameDataTypeChangeCommand, CarbonAlterTableDropColumnCommand}
+
+import org.apache.carbondata.common.exceptions.sql.MalformedCarbonCommandException
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+
+/**
+ * TODO remove the duplicate code and add the common methods to common class.
Review comment:
Is this TODO required?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-575454075
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1673/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] QiangCai commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
QiangCai commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r367890907
##########
File path: integration/spark2/src/main/scala/org/apache/spark/sql/parser/CarbonExtensionSpark2SqlParser.scala
##########
@@ -0,0 +1,162 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.parser
+
+import scala.language.implicitConversions
+
+import org.apache.spark.sql.catalyst.plans.logical._
+import org.apache.spark.sql.catalyst.CarbonParserUtil
+import org.apache.spark.sql.execution.command._
+import org.apache.spark.sql.execution.command.management.CarbonLoadDataCommand
+import org.apache.spark.sql.execution.command.schema.{CarbonAlterTableAddColumnCommand, CarbonAlterTableColRenameDataTypeChangeCommand, CarbonAlterTableDropColumnCommand}
+
+import org.apache.carbondata.common.exceptions.sql.MalformedCarbonCommandException
+import org.apache.carbondata.core.constants.CarbonCommonConstants
+
+/**
+ * TODO remove the duplicate code and add the common methods to common class.
Review comment:
done, already refactory
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] QiangCai commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
QiangCai commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r367881938
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -191,6 +191,12 @@ private CarbonCommonConstants() {
public static final String LOCK_PATH_DEFAULT = "";
+ /**
+ * Specifies the lock implement class.
Review comment:
done, the class should be the implement of ICarbonLock
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-575962993
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1684/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] jackylk commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
jackylk commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r365581701
##########
File path: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonExplainCommand.scala
##########
@@ -42,16 +43,37 @@ case class CarbonExplainCommand(
if (explainCommand.logicalPlan.isStreaming || isCommand) {
explainCommand.run(sparkSession)
} else {
- collectProfiler(sparkSession) ++ explainCommand.run(sparkSession)
+ CarbonExplainCommand.collectProfiler(explainCommand, sparkSession) ++
+ explainCommand.run(sparkSession)
}
}
- private def collectProfiler(sparkSession: SparkSession): Seq[Row] = {
+ override protected def opName: String = "EXPLAIN"
+}
+
+case class CarbonInternalExplainCommand(
Review comment:
Is this required?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] QiangCai commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
QiangCai commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r367879348
##########
File path: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/table/CarbonExplainCommand.scala
##########
@@ -42,16 +43,37 @@ case class CarbonExplainCommand(
if (explainCommand.logicalPlan.isStreaming || isCommand) {
explainCommand.run(sparkSession)
} else {
- collectProfiler(sparkSession) ++ explainCommand.run(sparkSession)
+ CarbonExplainCommand.collectProfiler(explainCommand, sparkSession) ++
+ explainCommand.run(sparkSession)
}
}
- private def collectProfiler(sparkSession: SparkSession): Seq[Row] = {
+ override protected def opName: String = "EXPLAIN"
+}
+
+case class CarbonInternalExplainCommand(
Review comment:
yes, CarbonExtensions will use this command instead of CarbonExplainCommand
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-573987123
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1625/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-574056547
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1630/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] jackylk commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
jackylk commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r365581444
##########
File path: core/src/main/java/org/apache/carbondata/core/constants/CarbonCommonConstants.java
##########
@@ -191,6 +191,12 @@ private CarbonCommonConstants() {
public static final String LOCK_PATH_DEFAULT = "";
+ /**
+ * Specifies the lock implement class.
Review comment:
please mention what are the options for this property
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-575978216
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1688/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] xuchuanyin commented on a change in pull request
#3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
xuchuanyin commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r368287460
##########
File path: core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java
##########
@@ -1100,6 +1101,62 @@ public static void deleteLoadsAndUpdateMetadata(CarbonTable carbonTable, boolean
}
}
+ public static void truncateTable(CarbonTable carbonTable)
+ throws ConcurrentOperationException, IOException {
+ ICarbonLock carbonTableStatusLock = CarbonLockFactory.getCarbonLockObj(
+ carbonTable.getAbsoluteTableIdentifier(), LockUsage.TABLE_STATUS_LOCK);
+ boolean locked = false;
+ try {
+ // Update load metadate file after cleaning deleted nodes
+ locked = carbonTableStatusLock.lockWithRetries();
+ if (locked) {
+ LOG.info("Table status lock has been successfully acquired.");
+ LoadMetadataDetails[] listOfLoadFolderDetailsArray =
+ SegmentStatusManager.readLoadMetadata(
+ CarbonTablePath.getMetadataPath(carbonTable.getTablePath()));
+ for (LoadMetadataDetails listOfLoadFolderDetails : listOfLoadFolderDetailsArray) {
+ boolean writing;
+ switch (listOfLoadFolderDetails.getSegmentStatus()) {
+ case INSERT_IN_PROGRESS:
+ writing = true;
+ break;
+ case INSERT_OVERWRITE_IN_PROGRESS:
+ writing = true;
+ break;
+ case STREAMING:
+ writing = true;
+ break;
+ default:
+ writing = false;
+ }
+ if (writing) {
+ throw new ConcurrentOperationException(carbonTable, "insert", "truncate");
+ }
+ }
Review comment:
can be optimized to reduce lines of code
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-574117569
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1634/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] CarbonDataQA1 commented on issue #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
CarbonDataQA1 commented on issue #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#issuecomment-573331457
Build Failed with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/1606/
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] QiangCai commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
QiangCai commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r367883785
##########
File path: core/src/main/java/org/apache/carbondata/core/metadata/DatabaseLocationProvider.java
##########
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.carbondata.core.metadata;
+
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.util.CarbonProperties;
+
+public abstract class DatabaseLocationProvider {
Review comment:
done
support converting database name to session-related name
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] jackylk commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
jackylk commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r365581555
##########
File path: core/src/main/java/org/apache/carbondata/core/metadata/schema/table/DatabaseDMSchemaStorageProvider.java
##########
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.carbondata.core.metadata.schema.table;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.carbondata.common.exceptions.sql.NoSuchDataMapException;
+
+/**
+ * Stores datamap schema in database
+ */
+public class DatabaseDMSchemaStorageProvider implements DataMapSchemaStorageProvider {
Review comment:
This class does nothing, is it required?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] QiangCai commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
QiangCai commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r368291356
##########
File path: core/src/main/java/org/apache/carbondata/core/statusmanager/SegmentStatusManager.java
##########
@@ -1100,6 +1101,62 @@ public static void deleteLoadsAndUpdateMetadata(CarbonTable carbonTable, boolean
}
}
+ public static void truncateTable(CarbonTable carbonTable)
+ throws ConcurrentOperationException, IOException {
+ ICarbonLock carbonTableStatusLock = CarbonLockFactory.getCarbonLockObj(
+ carbonTable.getAbsoluteTableIdentifier(), LockUsage.TABLE_STATUS_LOCK);
+ boolean locked = false;
+ try {
+ // Update load metadate file after cleaning deleted nodes
+ locked = carbonTableStatusLock.lockWithRetries();
+ if (locked) {
+ LOG.info("Table status lock has been successfully acquired.");
+ LoadMetadataDetails[] listOfLoadFolderDetailsArray =
+ SegmentStatusManager.readLoadMetadata(
+ CarbonTablePath.getMetadataPath(carbonTable.getTablePath()));
+ for (LoadMetadataDetails listOfLoadFolderDetails : listOfLoadFolderDetailsArray) {
+ boolean writing;
+ switch (listOfLoadFolderDetails.getSegmentStatus()) {
+ case INSERT_IN_PROGRESS:
+ writing = true;
+ break;
+ case INSERT_OVERWRITE_IN_PROGRESS:
+ writing = true;
+ break;
+ case STREAMING:
+ writing = true;
+ break;
+ default:
+ writing = false;
+ }
+ if (writing) {
+ throw new ConcurrentOperationException(carbonTable, "insert", "truncate");
+ }
+ }
Review comment:
fixed
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [carbondata] jackylk commented on a change in pull request #3574:
[CARBONDATA-3503] Optimize Carbon SparkExtensions
Posted by GitBox <gi...@apache.org>.
jackylk commented on a change in pull request #3574: [CARBONDATA-3503] Optimize Carbon SparkExtensions
URL: https://github.com/apache/carbondata/pull/3574#discussion_r365581997
##########
File path: pom.xml
##########
@@ -103,7 +103,6 @@
<module>integration/spark-datasource</module>
<module>integration/spark2</module>
<module>integration/spark-common-test</module>
- <module>integration/spark-carbon-common-test</module>
Review comment:
Are all the testcases moved to spark-common-test module?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services