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

Snap 2358 #395

Open
wants to merge 64 commits into
base: snappy/master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
7a065ed
Revert this. This is a workaround to handle insert like update.
Nov 13, 2017
be68fa5
Merge branch 'snappy/master' into vivek-try1
Nov 14, 2017
7e41a44
Merge branch 'snappy/master' into vivek-try1
Nov 20, 2017
2d1d5c6
Merge branch 'snappy/master' into vivek-try1
Nov 27, 2017
4153192
Merge branch 'snappy/master' into vivek-try1
Nov 30, 2017
24eea4a
Merge branch 'snappy/master' into vivek-try1
Dec 18, 2017
eb27e44
Merge branch 'snappy/master' into vivek-try1
Jan 2, 2018
e30c1de
Merge branch 'snappy/master' into vivek-try1
Jan 8, 2018
23ec481
Merge branch 'snappy/master' into vivek-try1
Jan 9, 2018
2818a9a
Merge branch 'snappy/master' into vivek-try1
Jan 12, 2018
6e46072
Merge branch 'snappy/master' into vivek-try1
Jan 17, 2018
e26645a
Merge branch 'snappy/master' into vivek-try1
Jan 22, 2018
df93ffd
Merge branch 'snappy/master' into vivek-try1
Jan 24, 2018
d6eae9c
Merge branch 'snappy/master' into vivek-try1
Jan 29, 2018
fb2073c
Merge branch 'snappy/master' into vivek-try1
Jan 31, 2018
072950f
Merge branch 'snappy/master' into vivek-try1
Jan 31, 2018
e96f002
Merge branch 'snappy/master' into vivek-try1
Feb 1, 2018
3b94b85
Merge branch 'snappy/master' into vivek-try1
Feb 5, 2018
e00c5fb
Merge branch 'snappy/master' into vivek-try1
Feb 6, 2018
bfdc06a
Merge branch 'snappy/master' into vivek-try1
Feb 7, 2018
9890dc9
Merge branch 'snappy/master' into vivek-try1
Feb 8, 2018
0bd20af
Merge branch 'snappy/master' into vivek-try1
Feb 9, 2018
bb89cac
Merge branch 'snappy/master' into vivek-try1
Feb 12, 2018
23e557b
Merge branch 'snappy/master' into vivek-try1
Feb 12, 2018
e532639
Merge branch 'snappy/master' into vivek-try1
Feb 20, 2018
fc50854
Merge branch 'snappy/master' into vivek-try1
Feb 21, 2018
6a46774
Performance and functional fixes in smart connector
Mar 3, 2018
55c9f83
Merge branch 'snappy/master' into vivek-try1
Mar 5, 2018
718f1b6
[SNAP-2243][SNAP-2188] procedure for smart connector iteration and fixes
Mar 8, 2018
3e5f9e7
minor comment correction
Mar 8, 2018
bafd47a
fixed couple of occasional test failures
Mar 9, 2018
0bc446b
Merge remote-tracking branch 'origin/snappy/master' into SNAP-2243
Mar 9, 2018
e161a82
check for table read permission for COLUMN_TABLE_SCAN procedure
Mar 10, 2018
49049d2
minor changes
Mar 10, 2018
e429a45
cleaned up methods to determine column table
Mar 11, 2018
ac6a403
Merge branch 'snappy/master' into vivek-try1
Mar 12, 2018
246d96d
made RawStoreResultSet more generic
Mar 18, 2018
0a107bc
Small change for doing build
Mar 19, 2018
32aacf7
Merge branch 'li-perfomance-test-SNAP-2243' into li-sorted-insert-SNA…
Mar 19, 2018
0af9b12
Merge branch 'snappy/master' into li-perfomance-test
Mar 22, 2018
983b840
Merge branch 'li-master' into li-sorted
Mar 22, 2018
c457184
Merge branch 'snappy/master' into li-sorted
Mar 23, 2018
8bfd92f
Merge branch 'snappy/master' into li-sorted
Mar 26, 2018
2d66b43
Merge branch 'snappy/master' into li-sorted
Apr 4, 2018
39c11b0
Merge branch 'snappy/master' into li-sorted
Apr 5, 2018
a9a6896
Merge branch 'snappy/master' into li-sorted
Apr 24, 2018
e69533e
Merge branch 'snappy/master' into li-sorted
May 8, 2018
5d5ff6b
Added a new class for delete
May 10, 2018
c64da9f
Merge branch 'snappy/master' into li-sorted
May 15, 2018
6b1e3f1
Merge branch 'snappy/master' into li-sorted
May 23, 2018
a4fe34a
Merge branch 'snappy/master' into SNAP-2358
May 30, 2018
7ba7b1f
Changes from Sumedh to sort column batches on minimum value
May 31, 2018
3caef48
Merge branch 'snappy/master' into SNAP-2358
Jun 6, 2018
4bf0739
Merge branch 'snappy/master' into SNAP-2358
Jun 7, 2018
57dac63
Removing hardcoded elimination of exceptions.
Jun 7, 2018
a47aebe
Merge branch 'snappy/master' into SNAP-2358
Jun 12, 2018
0469db9
Merge branch 'SNAP-2358' into SNAP-2358-v1
Jun 12, 2018
043a100
Incorporating required DDL changes so column batches would only be so…
Jun 14, 2018
25edb0a
Merge branch 'snappy/master' into SNAP-2358
Jun 18, 2018
9211923
Merge branch 'SNAP-2358' into SNAP-2358-v1
Jun 18, 2018
5298b38
Merge branch 'snappy/master' into SNAP-2358
Jun 25, 2018
e16f01d
Merge branch 'snappy/master' into SNAP-2358
hemanthmeka Aug 2, 2018
618ed86
Merge branch 'snappy/master' of https://github.com/SnappyDataInc/snap…
hemanthmeka Aug 7, 2018
3bddc90
merge from snappy/master
hemanthmeka Aug 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public ExternalTableMetaData(String entityName,
String dml,
String[] dependents,
String dataSourcePath,
String columnTableSorting,
String driverClass) {
this.entityName = entityName;
this.schema = schema;
Expand All @@ -44,6 +45,7 @@ public ExternalTableMetaData(String entityName,
this.dependents = dependents;
this.dataSourcePath = dataSourcePath;
this.driverClass = driverClass;
this.columnTableSortOrder = columnTableSorting;
}

public String entityName;
Expand All @@ -61,6 +63,7 @@ public ExternalTableMetaData(String entityName,
public String shortProvider;
public String dataSourcePath;
public String driverClass;
public String columnTableSortOrder;
public String viewText;
// columns for metadata queries
public List<Column> columns;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,4 +333,6 @@ public interface GfxdSerializable extends GfxdDSFID {
byte COLUMN_FORMAT_DELTA = 115;

byte COLUMN_DELETE_DELTA = 116;

byte COLUMN_DELETE_CHANGE = 117;
}
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,14 @@ public String[] getColumnNames() {
return this.partitionColumnNames;
}

/**
* Return the column positions (1-based) of partitioning columns
* in the table schema.
*/
public int[] getColumnPositions() {
return this.columnPositionsInRow;
}

@Override
public int getPartitioningColumnIndex(String partitionColumn) {
Integer idx = this.columnToIndexMap.get(partitionColumn);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
*/
package com.pivotal.gemfirexd.internal.engine.distributed.metadata;

import com.gemstone.gemfire.internal.cache.ExternalTableMetaData;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.pivotal.gemfirexd.internal.engine.distributed.utils.GemFireXDUtils;
import com.pivotal.gemfirexd.internal.engine.store.GemFireContainer;
import com.pivotal.gemfirexd.internal.iapi.error.StandardException;
import com.pivotal.gemfirexd.internal.iapi.reference.SQLState;
import com.pivotal.gemfirexd.internal.iapi.services.io.FormatableBitSet;
Expand Down Expand Up @@ -158,6 +160,26 @@ private void checkUpdateFormatSupported() throws StandardException {
.clear(this.queryType, IS_PRIMARY_KEY_TYPE);
checkForColumnConstr = false;
}

/**
* For sorted column batches allow delta insert that is implemented as update plan
* It is not necessary to check if its update vs insert since there will be no row in row buffer
*/
boolean isSortedColumnTable = false;
LocalRegion region = tqi.getRegion();
if (region != null) {
GemFireContainer container = (GemFireContainer)region.getUserAttribute();
if (container.isPartitioned()) {
ExternalTableMetaData md = container.fetchHiveMetaData(false);
if (md != null) {
isSortedColumnTable = md.columnTableSortOrder.equalsIgnoreCase("ASC") ||
md.columnTableSortOrder.equalsIgnoreCase("Ascending") ||
md.columnTableSortOrder.equalsIgnoreCase("DESC") ||
md.columnTableSortOrder.equalsIgnoreCase("Descending");
}
}
}

//ASIF: DISABLE FK Constraint check on query node
//this.fcd = this.tableQueryInfoList.get(this.updateTargetTableNum).getForeignKeyConstraintDescriptorIfAny();
for (int i = 0; i < this.updateCols.length; ++i) {
Expand All @@ -166,14 +188,14 @@ private void checkUpdateFormatSupported() throws StandardException {
if (cqi.isTableInfoMissing()) {
cqi.setMissingTableInfo(tqi);
}
if (cqi.isUsedInPartitioning()) {
if (!isSortedColumnTable && cqi.isUsedInPartitioning()) {
throw StandardException.newException(SQLState.NOT_IMPLEMENTED,
"Update of partitioning column not supported");
}
// For the time being since we are allowing only one table
// the columns are necessarily part of the lone TableQueryInfo
// Later the check needs to be more robust
if (cqi.isPartOfPrimaryKey(tqi.getPrimaryKeyColumns())) {
if (!isSortedColumnTable && cqi.isPartOfPrimaryKey(tqi.getPrimaryKeyColumns())) {
throw StandardException
.newException(
SQLState.NOT_IMPLEMENTED,
Expand Down