carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackylk <...@git.apache.org>
Subject [GitHub] carbondata pull request #932: [CARBONDATA-1074] Add TablePage and ConvertedR...
Date Tue, 23 May 2017 14:47:35 GMT
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/932#discussion_r118012761
  
    --- Diff: processing/src/main/java/org/apache/carbondata/processing/store/TablePage.java
---
    @@ -0,0 +1,203 @@
    +/*
    + * 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.processing.store;
    +
    +import java.io.ByteArrayOutputStream;
    +import java.io.DataOutputStream;
    +import java.io.IOException;
    +import java.math.BigDecimal;
    +import java.nio.ByteBuffer;
    +import java.util.ArrayList;
    +import java.util.List;
    +
    +import org.apache.carbondata.core.datastore.page.ComplexColumnPage;
    +import org.apache.carbondata.core.datastore.page.FixLengthColumnPage;
    +import org.apache.carbondata.core.datastore.page.KeyColumnPage;
    +import org.apache.carbondata.core.datastore.page.VarLengthColumnPage;
    +import org.apache.carbondata.core.keygenerator.KeyGenException;
    +import org.apache.carbondata.core.metadata.datatype.DataType;
    +import org.apache.carbondata.core.util.DataTypeUtil;
    +import org.apache.carbondata.processing.datatypes.GenericDataType;
    +import org.apache.carbondata.processing.newflow.row.ConvertedRow;
    +import org.apache.carbondata.processing.store.writer.exception.CarbonDataWriterException;
    +
    +import org.apache.spark.sql.types.Decimal;
    +
    +/**
    + * Represent a page data for all columns, we store its data in columnar layout, so that
    + * all processing apply to TablePage can be done in vectorized fashion.
    + */
    +class TablePage {
    +
    +  // For all dimension and measure columns, we store the column data directly in the
page,
    +  // the length of the page is the number of rows.
    +
    +  // TODO: we should have separate class for key columns so that keys are stored together
in
    +  // one vector to make it efficient for sorting
    +  private KeyColumnPage keyColumnPage;
    --- End diff --
    
    You mean through ColumnarVectorWrapper? In fact, processing package should not depend
on spark, so here I think it is better to use our own data structure. In future PR, we can
change KeyPage to have offheap implementation.


---
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