carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipesala <...@git.apache.org>
Subject [GitHub] incubator-carbondata pull request #597: [CARBONDATA-672]complex data type su...
Date Mon, 13 Feb 2017 03:58:09 GMT
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/597#discussion_r100721184
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/CarbonDictionaryDecoder.scala
---
    @@ -175,16 +175,25 @@ case class CarbonDictionaryDecoder(
                 val unsafeProjection = UnsafeProjection.create(output.map(_.dataType).toArray)
                 var flag = true
                 var total = 0L
    +
                 override final def hasNext: Boolean = iter.hasNext
    +
                 override final def next(): InternalRow = {
                   val startTime = System.currentTimeMillis()
                   val row: InternalRow = iter.next()
                   val data = row.toSeq(dataTypes).toArray
                   dictIndex.foreach { index =>
                     if (data(index) != null) {
    -                  data(index) = DataTypeUtil.getDataBasedOnDataType(dicts(index)
    -                    .getDictionaryValueForKey(data(index).asInstanceOf[Int]),
    -                    getDictionaryColumnIds(index)._3)
    +                  try {
    +                    data(index) = DataTypeUtil.getDataBasedOnDataType(dicts(index)
    +                      .getDictionaryValueForKey(data(index).asInstanceOf[Int]),
    +                      getDictionaryColumnIds(index)._3)
    +                  }
    +                  catch {
    +                    case x: ClassCastException => {
    --- End diff --
    
    How just exception logging could solve the issue? It can create some other issue, please
try to avoid classcast exception first.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message