Browse Source

Merge pull request #3354 from rpastrana/gh-3187-Remove-jdbcdriver

HPCC-3187 Remove JDBC Driver from HPCC-Platform source line

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 12 years ago
parent
commit
f85d6ef51a
31 changed files with 0 additions and 12346 deletions
  1. 0 3
      plugins/dbconnectors/CMakeLists.txt
  2. 0 27
      plugins/dbconnectors/hpccjdbc/CMakeLists.txt
  3. 0 35
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/CMakeLists.txt
  4. 0 882
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/DFUFile.java
  5. 0 1020
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/ECLEngine.java
  6. 0 44
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/ECLFunction.java
  7. 0 49
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/ECLFunctions.java
  8. 0 27
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCColumn.java
  9. 0 271
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCColumnMetaData.java
  10. 0 439
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCConnection.java
  11. 0 3024
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCDatabaseMetaData.java
  12. 0 98
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCDriver.java
  13. 0 241
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCJDBCUtils.java
  14. 0 140
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCLogicalFiles.java
  15. 0 577
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCPreparedStatement.java
  16. 0 69
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCQueries.java
  17. 0 291
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCQuery.java
  18. 0 1957
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCResultSet.java
  19. 0 205
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCResultSetMetadata.java
  20. 0 233
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCStatement.java
  21. 0 11
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCVersionTracker.java.in
  22. 0 169
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLColumn.java
  23. 0 209
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLExpressionFragment.java
  24. 0 251
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLJoinClause.java
  25. 0 116
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLOperator.java
  26. 0 844
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLParser.java
  27. 0 48
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLTable.java
  28. 0 151
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLWhereClause.java
  29. 0 699
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/test/jdbcdriver/HPCCDriverTest.java
  30. 0 64
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/test/jdbcdriver/HPCCDriverTestThread.java
  31. 0 152
      plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/test/jdbcdriver/SQLParserTest.java

+ 0 - 3
plugins/dbconnectors/CMakeLists.txt

@@ -1,3 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-project (hpccsystems-dbconnectors)
-add_subdirectory (hpccjdbc)

+ 0 - 27
plugins/dbconnectors/hpccjdbc/CMakeLists.txt

@@ -1,27 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-project(jdbcdriver Java)
-option(USE_HPCCJDBC "Configure use of JDBC DB Connector")
-if ( USE_HPCCJDBC )
-
-	set ( HPCC_JDBC_PAC_PATH com/hpccsystems/jdbcdriver)
-	set ( HPCC_JDBC_REL_PATH src/${HPCC_JDBC_PAC_PATH})
-	set ( HPCC_ECLJDBC_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${HPCC_JDBC_REL_PATH})
-	set ( HPCC_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
-	include(${HPCC_SOURCE_DIR}/version.cmake)
-
-	add_subdirectory (${HPCC_JDBC_REL_PATH})
-
-        find_package(JNI REQUIRED)
-        find_package(Java REQUIRED)
-
-        include_directories (
-                                        ${CMAKE_BINARY_DIR}
-                                        ${CMAKE_BINARY_DIR}/oss
-                                        ${JNI_INCLUDE_DIRS}
-                                        ${JAVA_INCLUDE_PATH}
-                                        ${JAVA_INCLUDE_PATH2}
-                                        )
-
-        set ( INSTALLDIR "${EXEC_DIR}")
-
-endif( USE_HPCCJDBC)

+ 0 - 35
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/CMakeLists.txt

@@ -1,35 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-
-configure_file("HPCCVersionTracker.java.in" "${HPCC_ECLJDBC_SOURCE_DIR}/HPCCVersionTracker.java")
-
-SET ( CMAKE_MODULE_PATH "${HPCC_SOURCE_DIR}/cmake_modules")
-SET ( EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/bin" )
-SET ( PRODUCT_PREFIX "hpccsystems" )
-
-SET (CLASS_DIR "class")
-FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${CLASS_DIR})
-SET (JAR_FILE "${PRODUCT_PREFIX}-${PROJECT_NAME}_${HPCC_PROJECT}-${HPCC_MAJOR}.${HPCC_MINOR}.${HPCC_POINT}.jar")
-SET (JAVA_FILES HPCCDatabaseMetaData.java HPCCQuery.java SQLExpressionFragment.java DFUFile.java HPCCDriver.java HPCCResultSet.java SQLOperator.java HPCCColumn.java ECLEngine.java HPCCResultSetMetadata.java SQLParser.java HPCCColumnMetaData.java HPCCPreparedStatement.java HPCCStatement.java SQLWhereClause.java HPCCConnection.java HPCCQueries.java SQLColumn.java HPCCJDBCUtils.java ECLFunction.java ECLFunctions.java HPCCVersionTracker.java)
-
-# compile all .java files with javac to .class
-ADD_CUSTOM_COMMAND(
-    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${JAVA_FILES}.class
-    COMMAND ${CMAKE_Java_COMPILER}
-    ARGS -d ${CMAKE_CURRENT_BINARY_DIR}/${CLASS_DIR}
-    ${CMAKE_CURRENT_SOURCE_DIR}/*.java
-)
-
-# build .jar file from .class files
-ADD_CUSTOM_COMMAND(
-    OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${JAR_FILE}
-    DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${JAVA_FILES}.class
-    COMMAND ${CMAKE_COMMAND}
-    ARGS -E chdir ${CMAKE_CURRENT_BINARY_DIR}/${CLASS_DIR}
-    ${CMAKE_Java_ARCHIVE} -cfv ${CMAKE_CURRENT_BINARY_DIR}/${JAR_FILE} ${HPCC_JDBC_PAC_PATH}
-)
-
-# the target
-ADD_CUSTOM_TARGET(
-    ${JAR_FILE}
-    ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${JAR_FILE}
-)

+ 0 - 882
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/DFUFile.java

@@ -1,882 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-public class DFUFile
-{
-    private String              Prefix;
-    private String              ClusterName;
-    private String              Directory;
-    private String              Description;
-    private int                 Parts;
-    private String              FullyQualifiedName;
-    private String              FileName;
-    private String              Owner;
-    private long                TotalSize;
-    private long                RecordCount;
-    private String              Modified;
-    private long                LongSize;
-    private long                LongRecordCount;
-    private boolean             isSuperFile;
-    private boolean             isZipFile;
-    private boolean             isDirectory;
-    private int                 Replicate;
-    private int                 IntSize;
-    private int                 IntRecordCount;
-    private boolean             FromRoxieCluster;
-    private boolean             BrowseData;
-    private boolean             IsKeyFile;
-    private Properties          Fields;
-    private String              Format;
-    private String              CsvSeparate;
-    private String              CsvTerminate;
-    private String              CsvQuote;
-    private String              Ecl;
-    private Properties          KeyedColumns;
-    private Properties          NonKeyedColumns;
-    private List<String>        relatedIndexes;
-    private List<String>        subFiles;
-    private String              IdxFilePosField;
-    private boolean             HasPayLoad;
-
-    private final static String RELATEDINDEXKEYWORD = "XDBC:RelIndexes";
-    private final static String IDXFILEPOSFIELDTAG  = "XDBC:PosField";
-
-    public DFUFile(String prefix, String clusterName, String filename)
-    {
-        super();
-        Prefix = prefix;
-        ClusterName = clusterName;
-        FileName = filename;
-        FullyQualifiedName = filename;
-
-        Directory = null;
-        Description = null;
-        Parts = -1;
-        Owner = null;
-        TotalSize = -1;
-        RecordCount = -1;
-        Modified = null;
-        LongSize = -1;
-        LongRecordCount = -1;
-        isSuperFile = false;
-        isZipFile = false;
-        isDirectory = false;
-        Replicate = -1;
-        IntSize = -1;
-        IntRecordCount = -1;
-        FromRoxieCluster = false;
-        BrowseData = false;
-        IsKeyFile = false;
-        Format = "FLAT";
-        CsvSeparate = null;
-        CsvTerminate = null;
-        CsvQuote = null;
-        Ecl = null;
-        Fields = new Properties();
-        KeyedColumns = new Properties();
-        NonKeyedColumns = new Properties();
-        relatedIndexes = null;
-        IdxFilePosField = null;
-        HasPayLoad = false;
-        subFiles = null;
-    }
-
-    public DFUFile(String prefix, String clusterName, String directory, String description, int parts, String filename,
-            String fullyqualifiedname, String owner, long totalSize, long recordCount, String modified, long longSize,
-            long longRecordCount, boolean isSuperFile, boolean isZipFile, boolean isDirectory, int replicate,
-            int intSize, int intRecordCount, boolean fromRoxieCluster, boolean browseData, boolean isKeyFile,
-            String format, String csvseparate, String csvterminate, String csvquote, String ecl)
-    {
-        Prefix = prefix;
-        ClusterName = clusterName;
-        Directory = directory;
-        Description = description;
-        Parts = parts;
-        FileName = filename;
-        FullyQualifiedName = fullyqualifiedname;
-        Owner = owner;
-        TotalSize = totalSize;
-        RecordCount = recordCount;
-        Modified = modified;
-        LongSize = longSize;
-        LongRecordCount = longRecordCount;
-        this.isSuperFile = isSuperFile;
-        this.isZipFile = isZipFile;
-        this.isDirectory = isDirectory;
-        Replicate = replicate;
-        IntSize = intSize;
-        IntRecordCount = intRecordCount;
-        FromRoxieCluster = fromRoxieCluster;
-        BrowseData = browseData;
-        IsKeyFile = isKeyFile;
-        Fields = new Properties();
-        Format = format;
-        CsvSeparate = csvseparate;
-        CsvTerminate = csvterminate;
-        CsvQuote = csvquote;
-        KeyedColumns = new Properties();
-        NonKeyedColumns = new Properties();
-
-        if (ecl != null && ecl.length() > 0)
-        {
-            Ecl = ecl;
-            setFileRecDef(ecl);
-        }
-        relatedIndexes = null;
-        IdxFilePosField = null;
-        HasPayLoad = false;
-        subFiles = null;
-    }
-
-    public DFUFile()
-    {
-        Prefix = null;
-        ClusterName = null;
-        Directory = null;
-        Description = null;
-        Parts = -1;
-        FullyQualifiedName = null;
-        FileName = null;
-        Owner = null;
-        TotalSize = -1;
-        RecordCount = -1;
-        Modified = null;
-        LongSize = -1;
-        LongRecordCount = -1;
-        this.isSuperFile = false;
-        this.isZipFile = false;
-        this.isDirectory = false;
-        Replicate = -1;
-        IntSize = -1;
-        IntRecordCount = -1;
-        FromRoxieCluster = false;
-        BrowseData = false;
-        IsKeyFile = false;
-        Fields = new Properties();
-        Format = "FLAT";
-        CsvSeparate = null;
-        CsvTerminate = null;
-        CsvQuote = null;
-        Ecl = null;
-        KeyedColumns = new Properties();
-        NonKeyedColumns = new Properties();
-        relatedIndexes = null;
-        IdxFilePosField = null;
-        HasPayLoad = false;
-        subFiles = null;
-    }
-
-    public String getFileName()
-    {
-        return FileName;
-    }
-
-    public void setFileName(String fileName)
-    {
-        FileName = fileName;
-    }
-
-    public String getPrefix()
-    {
-        return Prefix;
-    }
-
-    public void setPrefix(String prefix)
-    {
-        Prefix = prefix;
-    }
-
-    public String getClusterName()
-    {
-        return ClusterName;
-    }
-
-    public void setClusterName(String clusterName)
-    {
-        ClusterName = clusterName;
-    }
-
-    public String getDirectory()
-    {
-        return Directory;
-    }
-
-    public void setDirectory(String directory)
-    {
-        Directory = directory;
-    }
-
-    public String getDescription()
-    {
-        return Description;
-    }
-
-    public void setDescription(String description)
-    {
-        Description = description;
-
-        if (description.contains(RELATEDINDEXKEYWORD))
-            setRelatedIndexes(description.substring(description.indexOf(RELATEDINDEXKEYWORD)));
-
-        if (description.contains(IDXFILEPOSFIELDTAG))
-            setIdxFilePosField(description.substring(description.indexOf(IDXFILEPOSFIELDTAG)));
-    }
-
-    private void setIdxFilePosField(String str)
-    {
-        IdxFilePosField = str.substring(IDXFILEPOSFIELDTAG.length() + 1 + 1, str.indexOf(']'));
-    }
-
-    public String getIdxFilePosField()
-    {
-        return IdxFilePosField != null ? IdxFilePosField : getLastNonKeyedNumericField();
-    }
-
-    public boolean hasValidIdxFilePosField()
-    {
-        String tmp = getIdxFilePosField();
-        return tmp != null && tmp.length() > 0 ? true : false;
-    }
-
-    private String getLastNonKeyedNumericField()
-    {
-        // TODO get numeric field
-        return (String) NonKeyedColumns.get(NonKeyedColumns.size());
-    }
-
-    private void setRelatedIndexes(String str)
-    {
-        String indexes = str.substring(RELATEDINDEXKEYWORD.length() + 1 + 1, str.indexOf(']'));
-        StringTokenizer indexeToks = new StringTokenizer(indexes, ";");
-
-        while (indexeToks.hasMoreTokens())
-        {
-            addRelatedIndex(indexeToks.nextToken().trim());
-        }
-    }
-
-    public int getParts()
-    {
-        return Parts;
-    }
-
-    public void setParts(int parts)
-    {
-        Parts = parts;
-    }
-
-    public String getFullyQualifiedName()
-    {
-        return FullyQualifiedName;
-    }
-
-    public void setFullyQualifiedName(String name)
-    {
-        FullyQualifiedName = name;
-    }
-
-    public String getOwner()
-    {
-        return Owner;
-    }
-
-    public void setOwner(String owner)
-    {
-        Owner = owner;
-    }
-
-    public long getTotalSize()
-    {
-        return TotalSize;
-    }
-
-    public void setTotalSize(long totalSize)
-    {
-        TotalSize = totalSize;
-    }
-
-    public long getRecordCount()
-    {
-        return RecordCount;
-    }
-
-    public void setRecordCount(long recordCount)
-    {
-        RecordCount = recordCount;
-    }
-
-    public String getModified()
-    {
-        return Modified;
-    }
-
-    public void setModified(String modified)
-    {
-        Modified = modified;
-    }
-
-    public long getLongSize()
-    {
-        return LongSize;
-    }
-
-    public void setLongSize(long longSize)
-    {
-        LongSize = longSize;
-    }
-
-    public long getLongRecordCount()
-    {
-        return LongRecordCount;
-    }
-
-    public void setLongRecordCount(long longRecordCount)
-    {
-        LongRecordCount = longRecordCount;
-    }
-
-    public boolean isSuperFile()
-    {
-        return isSuperFile;
-    }
-
-    public void setSuperFile(boolean isSuperFile)
-    {
-        this.isSuperFile = isSuperFile;
-    }
-
-    public boolean isZipFile()
-    {
-        return isZipFile;
-    }
-
-    public void setZipFile(boolean isZipFile)
-    {
-        this.isZipFile = isZipFile;
-    }
-
-    public boolean isDirectory()
-    {
-        return isDirectory;
-    }
-
-    public void setDirectory(boolean isDirectory)
-    {
-        this.isDirectory = isDirectory;
-    }
-
-    public int getReplicate()
-    {
-        return Replicate;
-    }
-
-    public void setReplicate(int replicate)
-    {
-        Replicate = replicate;
-    }
-
-    public int getIntSize()
-    {
-        return IntSize;
-    }
-
-    public void setIntSize(int intSize)
-    {
-        IntSize = intSize;
-    }
-
-    public int getIntRecordCount()
-    {
-        return IntRecordCount;
-    }
-
-    public void setIntRecordCount(int intRecordCount)
-    {
-        IntRecordCount = intRecordCount;
-    }
-
-    public boolean isFromRoxieCluster()
-    {
-        return FromRoxieCluster;
-    }
-
-    public void setFromRoxieCluster(boolean fromRoxieCluster)
-    {
-        FromRoxieCluster = fromRoxieCluster;
-    }
-
-    public boolean isBrowseData()
-    {
-        return BrowseData;
-    }
-
-    public void setBrowseData(boolean browseData)
-    {
-        BrowseData = browseData;
-    }
-
-    public boolean isKeyFile()
-    {
-        return IsKeyFile;
-    }
-
-    public void setIsKeyFile(boolean isKeyFile)
-    {
-        IsKeyFile = isKeyFile;
-    }
-
-    public void setFileFields(String eclString)
-    {
-        Ecl = "";
-        if (eclString != null && eclString.length() > 0)
-        {
-            try
-            {
-                StringTokenizer commatokens = null;
-                // ECL RECORD can be defined as { type name,...,type name}; or
-                // RECORD type name;...;type name;END;
-                // TODO we should handle nested file types
-                if (eclString.toUpperCase().contains("RECORD"))
-                {
-                    String tmp = eclString.substring(eclString.indexOf("RECORD") + 6, eclString.indexOf("END"));
-                    commatokens = new StringTokenizer(tmp, ";");
-                }
-                else if (eclString.contains("{"))
-                {
-                    String tmp = eclString.substring(eclString.indexOf('{') + 1, eclString.indexOf('}'));
-                    commatokens = new StringTokenizer(tmp, ",");
-                }
-
-                if (commatokens != null)
-                {
-                    int index = 0;
-                    while (commatokens.hasMoreTokens())
-                    {
-                        String commatoken = commatokens.nextToken().trim();
-                        String spacesplit[] = commatoken.split("\\s+");
-
-                        String name = spacesplit[spacesplit.length - 1];
-                        if (name.length() > 0)
-                        {
-                            StringBuffer type = new StringBuffer();
-                            for (int i = 0; i < spacesplit.length - 1; i++)
-                            {
-                                type.append(spacesplit[i]);
-                                if (i + 1 < spacesplit.length - 1)
-                                    type.append(" ");
-                            }
-
-                            HPCCColumnMetaData columnmeta = new HPCCColumnMetaData(name, index,
-                                    HPCCDatabaseMetaData.convertECLtype2SQLtype(type.toString().toUpperCase()));
-                            columnmeta.setEclType(type.toString());
-                            columnmeta.setTableName(this.FullyQualifiedName);
-
-                            Ecl += type + " " + name + "; ";
-                            Fields.put(name.toUpperCase(), columnmeta);
-
-                            index++;
-                        }
-                    }
-                }
-            }
-            catch (Exception e)
-            {
-                System.out.println("Invalid ECL Record definition found in " + this.getFullyQualifiedName()
-                        + " details.");
-                return;
-            }
-        }
-    }
-
-    public Enumeration<Object> getAllFields()
-    {
-        return Fields.elements();
-    }
-
-    public Properties getAllFieldsProps()
-    {
-        return Fields;
-    }
-
-    public boolean containsField(String fieldName)
-    {
-        return Fields.containsKey(fieldName.toUpperCase());
-    }
-
-    public HPCCColumnMetaData getFieldMetaData(String fieldName)
-    {
-        return (HPCCColumnMetaData) Fields.get(fieldName.toUpperCase());
-    }
-
-    public String[] getAllTableFieldsStringArray()
-    {
-        String[] fields = new String[Fields.size()];
-        Enumeration<Object> it = Fields.elements();
-        while (it.hasMoreElements())
-        {
-            HPCCColumnMetaData col = ((HPCCColumnMetaData) it.nextElement());
-            fields[col.getIndex()] = col.getColumnName();
-        }
-        return fields;
-    }
-
-    public String getFormat()
-    {
-        return Format;
-    }
-
-    public String getCsvSeparate()
-    {
-        return CsvSeparate;
-    }
-
-    public String getCsvTerminate()
-    {
-        return CsvTerminate;
-    }
-
-    public void setFormat(String format)
-    {
-        if (format != null && format.length() > 0)
-        {
-            if (format.equalsIgnoreCase("THOR") || format.equalsIgnoreCase("CSV") || format.equalsIgnoreCase("XML"))
-            {
-                Format = format;
-                return;
-            }
-        }
-        // TODO Default = FLAT... is this safe to assume???
-        Format = "FLAT";
-    }
-
-    public void setCsvSeparate(String csvSeparate)
-    {
-        CsvSeparate = csvSeparate;
-    }
-
-    public void setCsvTerminate(String csvTerminate)
-    {
-        CsvTerminate = csvTerminate;
-    }
-
-    public void setCsvQuote(String csvQuote)
-    {
-        CsvQuote = csvQuote;
-    }
-
-    public String getCsvQuote()
-    {
-        return CsvQuote;
-    }
-
-    public boolean hasFileRecDef()
-    {
-        return Ecl == null || Ecl.length() <= 0 ? false : true;
-    }
-
-    public String getFileRecDef(String structname)
-    {
-        return Ecl == null ? null : structname + " := RECORD " + Ecl + "END; ";
-    }
-
-    public void setFileRecDef(String ecl)
-    {
-        if (ecl != null && ecl.length() > 0)
-            setFileFields(ecl);
-    }
-
-    public HPCCColumnMetaData getCompatibleField(String keyName, String keyType)
-    {
-        // EclColumnMetaData field = (EclColumnMetaData)
-        // Fields.get(keyName.toUpperCase());
-        // want to match up name and type, for now just check name.
-        return (HPCCColumnMetaData) Fields.get(keyName.toUpperCase());
-    }
-
-    public void setKeyedColumns(Properties KeyFields)
-    {
-        KeyedColumns = KeyFields;
-    }
-
-    public void setNonKeyedColumns(Properties NonKeyFields)
-    {
-        NonKeyedColumns = NonKeyFields;
-        if (NonKeyFields != null && NonKeyFields.size() > 0)
-            HasPayLoad = true;
-    }
-
-    public void addKeyedColumnInOrder(String KeyLabel)
-    {
-        KeyedColumns.put(KeyedColumns.size() + 1, KeyLabel);
-    }
-
-    public void addKeyedColumn(int KeyIndex, String KeyLabel)
-    {
-        if (!KeyedColumns.containsKey(KeyIndex))
-            KeyedColumns.put(KeyIndex, KeyLabel);
-    }
-
-    public void addNonKeyedColumnInOrder(String KeyLabel)
-    {
-        if (KeyLabel.startsWith("__internal_fpos__"))
-        {
-            // IndexPositionField = KeyLabel;
-            return;
-        }
-        NonKeyedColumns.put(NonKeyedColumns.size() + 1, KeyLabel);
-    }
-
-    public void addNonKeyedColumn(int NonKeyIndex, String NonKeyLabel)
-    {
-        if (!NonKeyedColumns.containsKey(NonKeyIndex))
-        {
-            NonKeyedColumns.put(NonKeyIndex, NonKeyLabel);
-            HasPayLoad = true;
-        }
-    }
-
-    public boolean hasPayLoad()
-    {
-        return HasPayLoad;
-    }
-
-    public Properties getKeyedColumns()
-    {
-        return KeyedColumns;
-    }
-
-    public Properties getNonKeyedColumns()
-    {
-        return NonKeyedColumns;
-    }
-
-    public int getNonKeyColumnIndex(String ColumnName)
-    {
-        int cols = NonKeyedColumns.size();
-        for (int i = 1; i <= cols; i++)
-        {
-            if (NonKeyedColumns.get(i).equals(ColumnName))
-                return i;
-        }
-
-        return -1;
-    }
-
-    public int getKeyColumnIndex(String ColumnName)
-    {
-        int cols = KeyedColumns.size();
-        for (int i = 1; i <= cols; i++)
-        {
-            if (KeyedColumns.get(i).equals(ColumnName))
-                return i;
-        }
-        return -1;
-    }
-
-    public void addRelatedIndex(String IndexName)
-    {
-        if (relatedIndexes == null)
-            relatedIndexes = new ArrayList<String>();
-
-        relatedIndexes.add(IndexName);
-    }
-
-    public void setRelatedIndexes(List<String> indexes)
-    {
-        relatedIndexes = indexes;
-    }
-
-    public boolean isRelatedIndex(String indexname)
-    {
-        if (relatedIndexes != null)
-            return relatedIndexes.contains(indexname);
-        return false;
-    }
-
-    public Iterator<String> getRelatedIndexes()
-    {
-        return relatedIndexes == null ? null : relatedIndexes.iterator();
-    }
-
-    public String[] getRelatedIndexesAsArray()
-    {
-        String[] indexes = new String[relatedIndexes.size()];
-        for (int i = 0; i < indexes.length; i++)
-        {
-            indexes[i] = relatedIndexes.get(i);
-        }
-        return indexes;
-    }
-
-    public List<String> getRelatedIndexesList()
-    {
-        return relatedIndexes;
-    }
-
-    public int getRelatedIndexesCount()
-    {
-        return relatedIndexes == null ? 0 : relatedIndexes.size();
-    }
-
-    public Object getFileRecDefwithIndexpos(HPCCColumnMetaData fieldMetaData, String structname)
-    {
-        if (fieldMetaData != null)
-            return structname + " := RECORD " + Ecl + fieldMetaData.getEclType() + " " + fieldMetaData.getColumnName()
-                    + " {virtual(fileposition)}; END; ";
-
-        return structname + " := RECORD " + Ecl + " END; "; // might need to throw exception instead
-    }
-
-    public String getKeyedFieldsAsDelmitedString(char c, String prefixtoappend)
-    {
-        StringBuilder fields = new StringBuilder();
-        int colscount = KeyedColumns.size();
-
-        for (int i = 1; i <= colscount; i++)
-        {
-            if (prefixtoappend != null)
-                fields.append(prefixtoappend).append('.');
-            fields.append(KeyedColumns.get(i));
-            if (i < colscount)
-                fields.append(c).append(" ");
-        }
-        return fields.toString();
-    }
-
-    public String getNonKeyedFieldsAsDelmitedString(char c, String prefixtoappend)
-    {
-        StringBuilder fields = new StringBuilder();
-        int colscount = NonKeyedColumns.size();
-
-        for (int i = 1; i <= colscount; i++)
-        {
-            if (prefixtoappend != null)
-                fields.append(prefixtoappend).append('.');
-            fields.append(NonKeyedColumns.get(i));
-            if (i < colscount)
-                fields.append(c).append(" ");
-        }
-        return fields.toString();
-    }
-
-    public String getAllFieldsAsDelimitedString(char c)
-    {
-        String[] cols = getAllTableFieldsStringArray();
-        StringBuilder fields = new StringBuilder();
-        if (cols.length <= 0)
-        {
-            for (int index = 0; index < cols.length; index++)
-            {
-                fields.append(cols[index]);
-
-                if (index < cols.length - 1)
-                    fields.append(c).append(" ");
-            }
-        }
-
-        return fields.toString();
-    }
-
-    public String getIndexNameByIndex(int i)
-    {
-        return relatedIndexes.get(i);
-    }
-
-    public boolean hasRelatedIndexes()
-    {
-        return relatedIndexes == null || relatedIndexes.size() <= 0 ? false : true;
-    }
-
-    public boolean containsField(HPCCColumnMetaData fieldMetaData, boolean verifyEclType)
-    {
-        String fieldName = fieldMetaData.getColumnName().toUpperCase();
-        if (Fields.containsKey(fieldName))
-            if (!verifyEclType
-                    || ((HPCCColumnMetaData) Fields.get(fieldName)).getEclType().equals(fieldMetaData.getEclType()))
-                return true;
-        return false;
-    }
-
-    public boolean containsAllFieldsNames(String[] columnNames)
-    {
-        if (columnNames != null)
-        {
-            for (int i = 0; i < columnNames.length; i++)
-            {
-                if (!this.containsField(columnNames[i]))
-                    return false;
-            }
-            return true;
-        }
-
-        return false;
-    }
-
-    public int getNonKeyedColumnsCount()
-    {
-        return NonKeyedColumns == null ? 0 : NonKeyedColumns.size();
-    }
-
-    public boolean containsField(HPCCColumnMetaData column)
-    {
-        return this.containsField(column.getColumnName());
-    }
-
-    public int getSubfilesCount()
-    {
-        return (subFiles == null) ? 0 : subFiles.size();
-    }
-
-    public boolean containsSubfiles()
-    {
-        return (getSubfilesCount() > 0) ? true : false;
-    }
-
-    public List<String> getSubfiles()
-    {
-        return subFiles;
-    }
-
-    public String getSubfile(int index)
-    {
-        String subfilename = "";
-
-        try
-        {
-            if (subFiles != null)
-                subfilename = subFiles.get(index);
-        }
-        catch (Exception e)
-        {
-        }
-
-        return subfilename;
-    }
-
-    public boolean addSubfile(String subfilename)
-    {
-        boolean isSuccess = false;
-
-        if (subfilename.length() > 0)
-        {
-            if (subFiles == null)
-                subFiles = new ArrayList<String>();
-            try
-            {
-                isSuccess = subFiles.add(subfilename);
-            }
-            catch (Exception e)
-            {
-                isSuccess = false;
-            }
-        }
-
-        return isSuccess;
-    }
-}

File diff suppressed because it is too large
+ 0 - 1020
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/ECLEngine.java


+ 0 - 44
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/ECLFunction.java

@@ -1,44 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-public class ECLFunction
-{
-    private String             name;
-    private boolean            acceptsWilCard;
-    private boolean            acceptsMultipleInputs;
-    private HPCCColumnMetaData returnType;
-
-    public ECLFunction(String thename, boolean acceptswild, HPCCColumnMetaData returntype, boolean multipleInput)
-    {
-        name = thename;
-        acceptsWilCard = acceptswild;
-        returnType = returntype;
-        acceptsMultipleInputs = multipleInput;
-    }
-
-    public ECLFunction(String thename, HPCCColumnMetaData returntype)
-    {
-        name = thename;
-        acceptsWilCard = false;
-        returnType = returntype;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public boolean acceptsWilCard()
-    {
-        return acceptsWilCard;
-    }
-
-    public HPCCColumnMetaData getReturnType()
-    {
-        return returnType;
-    }
-
-    public boolean acceptsMultipleInputs()
-    {
-        return acceptsMultipleInputs;
-    }
-}

+ 0 - 49
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/ECLFunctions.java

@@ -1,49 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class ECLFunctions
-{
-    static Map<String, ECLFunction> functions;
-    static
-    {
-        functions = new HashMap<String, ECLFunction>();
-
-        functions.put("COUNT", new ECLFunction("COUNT", true, new HPCCColumnMetaData("countreturn", 0,
-                java.sql.Types.NUMERIC), true));
-        functions.put("MAX", new ECLFunction("MAX", true,
-                new HPCCColumnMetaData("maxreturn", 0, java.sql.Types.NUMERIC), false));
-        functions.put("MIN", new ECLFunction("MIN", true,
-                new HPCCColumnMetaData("minreturn", 0, java.sql.Types.NUMERIC), false));
-        functions.put("SUM", new ECLFunction("SUM", true,
-                new HPCCColumnMetaData("sumreturn", 0, java.sql.Types.NUMERIC), false));
-    }
-
-    static ECLFunction getEclFunction(String funcname)
-    {
-        return functions.get(funcname);
-    }
-
-    static public boolean verifyEclFunction(String name, List<HPCCColumnMetaData> funccols)
-    {
-        String upperCaseName = name.toUpperCase();
-        if (functions.containsKey(upperCaseName))
-        {
-            ECLFunction function = functions.get(upperCaseName);
-
-            if (funccols.size() > 1 && !function.acceptsMultipleInputs())
-                return false;
-
-            for (HPCCColumnMetaData tmp : funccols)
-            {
-                if (!function.acceptsWilCard() && tmp.getColumnName().contains("*"))
-                    return false;
-            }
-            return true;
-        }
-        else
-            return false;
-    }
-}

+ 0 - 27
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCColumn.java

@@ -1,27 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-/**
- * @author ChalaAX
- */
-
-public class HPCCColumn
-{
-    private String name;
-    private String value;
-
-    public HPCCColumn(String name, String value)
-    {
-        this.name = name;
-        this.value = value;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public String getValue()
-    {
-        return value;
-    }
-}

+ 0 - 271
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCColumnMetaData.java

@@ -1,271 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.util.List;
-
-/**
- * @author rpastrana
- */
-
-public class HPCCColumnMetaData
-{
-    private String                   columnName;
-    private int                      index;
-    private int                      sqlType;
-
-    private String                   eclType;
-    private String                   tableName;
-    private int                      columnSize;
-    private int                      decimalDigits;
-    private int                      radix;
-    private String                   nullable;
-    private String                   remarks;
-    private String                   columnDefault;
-    // private Properties restrictions;
-    private int                      paramType;
-    private String                   javaClassName;
-    private String                   constantValue;
-    private int                      columnType;
-    private String                   alias;
-    private List<HPCCColumnMetaData> funccols;
-
-    final static int                 COLUMN_TYPE_DATA     = 1;
-    final static int                 COLUMN_TYPE_CONSTANT = 2;
-    final static int                 COLUMN_TYPE_FNCTION  = 3;
-
-    public HPCCColumnMetaData(String columnName, int index, int sqlType, String constant, String eclType)
-    {
-        constantValue = constant;
-        this.columnName = columnName;
-        this.index = index;
-        this.sqlType = sqlType;
-        this.paramType = HPCCDatabaseMetaData.procedureColumnUnknown;
-        javaClassName = HPCCDatabaseMetaData.convertSQLtype2JavaClassName(this.sqlType);
-        this.eclType = eclType;
-        columnType = COLUMN_TYPE_CONSTANT;
-        funccols = null;
-        alias = null;
-    }
-
-    public HPCCColumnMetaData(String columnName, int index, int sqlType)
-    {
-        this.columnName = columnName;
-        this.index = index;
-        this.sqlType = sqlType;
-        this.paramType = HPCCDatabaseMetaData.procedureColumnUnknown;
-        javaClassName = HPCCDatabaseMetaData.convertSQLtype2JavaClassName(this.sqlType);
-        constantValue = null;
-        columnType = COLUMN_TYPE_DATA;
-        funccols = null;
-        alias = null;
-    }
-
-    public HPCCColumnMetaData(String columnName, int index, List<HPCCColumnMetaData> columns)
-    {
-        this.columnName = columnName;
-        this.index = index;
-        this.sqlType = java.sql.Types.OTHER;
-        this.paramType = HPCCDatabaseMetaData.procedureColumnUnknown;
-        javaClassName = HPCCDatabaseMetaData.convertSQLtype2JavaClassName(this.sqlType);
-        constantValue = null;
-        columnType = COLUMN_TYPE_FNCTION;
-        funccols = columns;
-        alias = null;
-    }
-
-    public void setConstantValue(String value)
-    {
-        constantValue = value;
-    }
-
-    public boolean isConstant()
-    {
-        return constantValue != null;
-    }
-
-    public String getConstantValue()
-    {
-        return constantValue;
-    }
-
-    public String getColumnName()
-    {
-        return columnName;
-    }
-
-    public String getColumnNameOrAlias()
-    {
-        if (alias != null)
-            return alias;
-        else
-            return columnName;
-    }
-
-    public void setColumnName(String columnName)
-    {
-        this.columnName = columnName;
-    }
-
-    public int getIndex()
-    {
-        return index;
-    }
-
-    public void setIndex(int index)
-    {
-        this.index = index;
-    }
-
-    public int getParamType()
-    {
-        return paramType;
-    }
-
-    public void setParamType(int paramType)
-    {
-        this.paramType = paramType;
-    }
-
-    // public Properties getRestrictions() {
-    // return restrictions;
-    // }
-    //
-    // public void addRestriction(String restriction, String value)
-    // {
-    // if (restrictions == null)
-    // restrictions = new Properties();
-    //
-    // this.restrictions.put(restriction, value);
-    // }
-    //
-    // public String getRestrictionStringValue(String restriction)
-    // {
-    // return (String)this.restrictions.get(restriction);
-    // }
-
-    public void setSqlType(int type)
-    {
-        sqlType = type;
-    }
-
-    public int getSqlType()
-    {
-        return sqlType;
-    }
-
-    public String getEclType()
-    {
-        return eclType;
-    }
-
-    public void setEclType(String eclType)
-    {
-        this.eclType = eclType;
-        this.sqlType = HPCCDatabaseMetaData.convertECLtype2SQLtype(eclType.toUpperCase());
-    }
-
-    public String getTableName()
-    {
-        return tableName;
-    }
-
-    public void setTableName(String tableName)
-    {
-        this.tableName = tableName;
-    }
-
-    public int getColumnSize()
-    {
-        return columnSize;
-    }
-
-    public void setColumnSize(int columnSize)
-    {
-        this.columnSize = columnSize;
-    }
-
-    public int getDecimalDigits()
-    {
-        return decimalDigits;
-    }
-
-    public void setDecimalDigits(int decimalDigits)
-    {
-        this.decimalDigits = decimalDigits;
-    }
-
-    public int getRadix()
-    {
-        return radix;
-    }
-
-    public void setRadix(int radix)
-    {
-        this.radix = radix;
-    }
-
-    public String getNullable()
-    {
-        return nullable;
-    }
-
-    public void setNullable(String nullable)
-    {
-        this.nullable = nullable;
-    }
-
-    public String getRemarks()
-    {
-        return remarks;
-    }
-
-    public void setRemarks(String remarks)
-    {
-        this.remarks = remarks;
-    }
-
-    public String getColumnDefault()
-    {
-        return columnDefault;
-    }
-
-    public void setColumnDefault(String columnDefault)
-    {
-        this.columnDefault = columnDefault;
-    }
-
-    public String getJavaClassName()
-    {
-        return javaClassName;
-    }
-
-    public int getColumnType()
-    {
-        return columnType;
-    }
-
-    public void setColumnType(int columnType)
-    {
-        this.columnType = columnType;
-    }
-
-    public List<HPCCColumnMetaData> getFunccols()
-    {
-        return funccols;
-    }
-
-    public String getAlias()
-    {
-        return alias;
-    }
-
-    public void setAlias(String alias)
-    {
-        this.alias = alias;
-    }
-
-    @Override
-    public String toString()
-    {
-        return "Name: " + this.columnName + " SQL Type: " + sqlType + " ECL Type: " + eclType;
-    }
-}

+ 0 - 439
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCConnection.java

@@ -1,439 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.sql.Array;
-import java.sql.Blob;
-import java.sql.CallableStatement;
-import java.sql.Clob;
-import java.sql.Connection;
-import java.sql.DatabaseMetaData;
-import java.sql.NClob;
-import java.sql.PreparedStatement;
-import java.sql.SQLClientInfoException;
-import java.sql.SQLException;
-import java.sql.SQLWarning;
-import java.sql.SQLXML;
-import java.sql.Savepoint;
-import java.sql.Statement;
-import java.sql.Struct;
-import java.util.Map;
-import java.util.Properties;
-
-/**
- *
- * @author rpastrana
- */
-
-public class HPCCConnection implements Connection
-{
-    public static final String   ECLRESULTLIMDEFAULT      = "100";
-    public static final String   CLUSTERDEFAULT           = "hthor";
-    public static final String   QUERYSETDEFAULT          = "hthor";
-    public static final String   SERVERADDRESSDEFAULT     = "localhost";
-    public static final String   WSECLWATCHPORTDEFAULT    = "8010";
-    public static final String   WSECLPORTDEFAULT         = "8002";
-    public static final String   WSECLDIRECTPORTDEFAULT   = "8010";
-    public static final int      FETCHPAGESIZEDEFAULT     = 100;
-    public static final String   LAZYLOADDEFAULT          = "true";
-    public static final int      CONNECTTIMEOUTMILDEFAULT = 1000;
-
-    private boolean              closed;
-    private HPCCDatabaseMetaData metadata;
-    private Properties           props;
-    private String               serverAddress;
-    private Properties           clientInfo;
-
-    public HPCCConnection(Properties props)
-    {
-        closed = false;
-
-        this.serverAddress = SERVERADDRESSDEFAULT;
-
-        if (props.containsKey("ServerAddress"))
-            this.serverAddress = props.getProperty("ServerAddress");
-        else
-            props.setProperty("ServerAddress", this.serverAddress);
-
-        this.props = props;
-
-        if (!this.props.containsKey("Cluster"))
-            this.props.setProperty("Cluster", CLUSTERDEFAULT);
-
-        if (!this.props.containsKey("QuerySet"))
-            this.props.setProperty("QuerySet", QUERYSETDEFAULT);
-
-        if (!this.props.containsKey("WsECLWatchAddress"))
-            this.props.setProperty("WsECLWatchAddress", serverAddress);
-
-        if (!this.props.containsKey("WsECLWatchPort"))
-            this.props.setProperty("WsECLWatchPort", WSECLWATCHPORTDEFAULT);
-
-        if (!this.props.containsKey("WsECLAddress"))
-            this.props.setProperty("WsECLAddress", serverAddress);
-
-        if (!this.props.containsKey("WsECLPort"))
-            this.props.setProperty("WsECLPort", WSECLPORTDEFAULT);
-
-        if (!this.props.containsKey("WsECLDirectAddress"))
-            this.props.setProperty("WsECLDirectAddress", serverAddress);
-
-        if (!this.props.containsKey("WsECLDirectPort"))
-            this.props.setProperty("WsECLDirectPort", WSECLDIRECTPORTDEFAULT);
-
-        if (!this.props.containsKey("username"))
-            this.props.setProperty("username", "");
-
-        if (!this.props.containsKey("password"))
-            this.props.setProperty("password", "");
-
-        if (!this.props.containsKey("PageSize") || !HPCCJDBCUtils.isNumeric(this.props.getProperty("PageSize")))
-            this.props.setProperty("PageSize", String.valueOf(FETCHPAGESIZEDEFAULT));
-
-        if (!this.props.containsKey("ConnectTimeoutMilli")
-                || !HPCCJDBCUtils.isNumeric(this.props.getProperty("ConnectTimeoutMilli")))
-            this.props.setProperty("ConnectTimeoutMilli", String.valueOf(CONNECTTIMEOUTMILDEFAULT));
-
-        boolean setdefaultreslim = false;
-        if (this.props.containsKey("EclResultLimit"))
-        {
-            String eclreslim = this.props.getProperty("EclResultLimit").trim();
-            try
-            {
-                if (HPCCJDBCUtils.isNumeric(eclreslim))
-                {
-                    if (Integer.valueOf(eclreslim).intValue() <= 0)
-                        setdefaultreslim = true;
-                }
-                else
-                {
-                    if (!eclreslim.equalsIgnoreCase("ALL"))
-                        setdefaultreslim = true;
-                }
-            }
-            catch (Exception e)
-            {
-                setdefaultreslim = true;
-            }
-        }
-        else
-            setdefaultreslim = true;
-
-        if (setdefaultreslim)
-        {
-            this.props.setProperty("EclResultLimit", ECLRESULTLIMDEFAULT);
-            System.out.println("Invalid Numeric EclResultLimit value detected, using default value: "
-                    + ECLRESULTLIMDEFAULT);
-        }
-
-        String basicAuth = createBasicAuth(this.props.getProperty("username"), props.getProperty("password"));
-
-        this.props.put("BasicAuth", basicAuth);
-
-        if (!this.props.containsKey("LazyLoad"))
-            this.props.setProperty("LazyLoad", LAZYLOADDEFAULT);
-
-        metadata = new HPCCDatabaseMetaData(props);
-
-        // TODO not doing anything w/ this yet, just exposing it to comply w/ API definition...
-        clientInfo = new Properties();
-
-        System.out.println("EclConnection initialized - server: " + this.serverAddress);
-    }
-
-    public static String createBasicAuth(String username, String passwd)
-    {
-        return "Basic " + HPCCJDBCUtils.Base64Encode((username + ":" + passwd).getBytes(), false);
-    }
-
-    public Properties getProperties()
-    {
-        return props;
-    }
-
-    public String getProperty(String propname)
-    {
-        return props.getProperty(propname, "");
-    }
-
-    public String getServerAddress()
-    {
-        return serverAddress;
-    }
-
-    public void setServerAddress(String serverAddress)
-    {
-        this.serverAddress = serverAddress;
-    }
-
-    public HPCCDatabaseMetaData getDatabaseMetaData()
-    {
-        return metadata;
-    }
-
-    public void setMetadata(HPCCDatabaseMetaData metadata)
-    {
-        this.metadata = metadata;
-    }
-
-    public Statement createStatement() throws SQLException
-    {
-        return new HPCCPreparedStatement(this, null);
-    }
-
-    public PreparedStatement prepareStatement(String query) throws SQLException
-    {
-        return new HPCCPreparedStatement(this, query);
-    }
-
-    public CallableStatement prepareCall(String sql) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: prepareCall(string sql) Not supported yet.");
-    }
-
-    public String nativeSQL(String sql) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: nativeSQL(string sql) Not supported yet.");
-    }
-
-    public void setAutoCommit(boolean autoCommit) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: setAutoCommit(boolean autoCommit) Not supported yet.");
-    }
-
-    public boolean getAutoCommit() throws SQLException
-    {
-        return true;
-    }
-
-    public void commit() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: commit Not supported yet.");
-    }
-
-    public void rollback() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: rollback Not supported yet.");
-    }
-
-    public void close() throws SQLException
-    {
-        closed = true;
-    }
-
-    public boolean isClosed() throws SQLException
-    {
-        return closed;
-    }
-
-    public DatabaseMetaData getMetaData() throws SQLException
-    {
-        return metadata;
-    }
-
-    public void setReadOnly(boolean readOnly) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: setReadOnly Not supported yet.");
-    }
-
-    public boolean isReadOnly() throws SQLException
-    {
-        return true;
-    }
-
-    public void setCatalog(String catalog) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: setCatalog Not supported yet.");
-    }
-
-    public String getCatalog() throws SQLException
-    {
-        return props.getProperty("Cluster", CLUSTERDEFAULT);
-    }
-
-    public void setTransactionIsolation(int level) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: settransactionisolation Not supported yet.");
-    }
-
-    public int getTransactionIsolation() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: getTransactionIsolation Not supported yet.");
-    }
-
-    public SQLWarning getWarnings() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: getWarnings Not supported yet.");
-    }
-
-    public void clearWarnings() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: clearWarnings Not supported yet.");
-    }
-
-    public Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
-    {
-        System.out.println("##Statement EclConnection::createStatement(resulttype, resultsetcon)##");
-        return new HPCCPreparedStatement(this, null);
-    }
-
-    public PreparedStatement prepareStatement(String query, int resultSetType, int resultSetConcurrency)
-            throws SQLException
-    {
-        System.out.println("##EclConnection::createStatement(" + query + ", resultsetype, resultsetcon)##");
-        return new HPCCPreparedStatement(this, query);
-    }
-
-    public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclConnection: prepareCall(String sql, int resultSetType, int resultSetConcurrency) Not supported yet.");
-    }
-
-    public Map<String, Class<?>> getTypeMap() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: getTypeMap Not supported yet.");
-    }
-
-    public void setTypeMap(Map<String, Class<?>> map) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: setTypeMap Not supported yet.");
-    }
-
-    public void setHoldability(int holdability) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: setHoldability Not supported yet.");
-    }
-
-    public int getHoldability() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: getHoldability Not supported yet.");
-    }
-
-    public Savepoint setSavepoint() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: setSavepoint Not supported yet.");
-    }
-
-    public Savepoint setSavepoint(String name) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: setSavepoint Not supported yet.");
-    }
-
-    public void rollback(Savepoint savepoint) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: rollback Not supported yet.");
-    }
-
-    public void releaseSavepoint(Savepoint savepoint) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: releaseSavepoint Not supported yet.");
-    }
-
-    public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
-            throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: createStatement Not supported yet.");
-    }
-
-    public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency,
-            int resultSetHoldability) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclConnection: prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) Not supported yet.");
-    }
-
-    public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency,
-            int resultSetHoldability) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclConnection: prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) Not supported yet.");
-    }
-
-    public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclConnection: prepareStatement(String sql, int autoGeneratedKeys) Not supported yet.");
-    }
-
-    public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclConnection: prepareStatement(String sql, int[] columnIndexes) Not supported yet.");
-    }
-
-    public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclConnection:  prepareStatement(String sql, String[] columnNames) Not supported yet.");
-    }
-
-    public Clob createClob() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: createClob Not supported yet.");
-    }
-
-    public Blob createBlob() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: createBlob Not supported yet.");
-    }
-
-    public NClob createNClob() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: createNClob Not supported yet.");
-    }
-
-    public SQLXML createSQLXML() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: createSQLXML Not supported yet.");
-    }
-
-    public boolean isValid(int timeout) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: isValid Not supported yet.");
-    }
-
-    public void setClientInfo(String name, String value) throws SQLClientInfoException
-    {
-        System.out.println("ECLCONNECTION SETCLIENTINFO");
-        clientInfo.put(name, value);
-    }
-
-    public void setClientInfo(Properties properties) throws SQLClientInfoException
-    {
-        System.out.println("ECLCONNECTION SETCLIENTINFO");
-        clientInfo = properties;
-    }
-
-    public String getClientInfo(String name) throws SQLException
-    {
-        System.out.println("ECLCONNECTION GETCLIENTINFO");
-        return (String) clientInfo.getProperty(name);
-    }
-
-    public Properties getClientInfo() throws SQLException
-    {
-        System.out.println("ECLCONNECTION GETCLIENTINFO");
-        return clientInfo;
-    }
-
-    public Array createArrayOf(String typeName, Object[] elements) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclConnection: createArrayOf(String typeName, Object[] elements) Not supported yet.");
-    }
-
-    public Struct createStruct(String typeName, Object[] attributes) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclConnection: createStruct(String typeName, Object[] attributes)Not supported yet.");
-    }
-
-    public <T> T unwrap(Class<T> iface) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: unwrap(Class<T> iface) Not supported yet.");
-    }
-
-    public boolean isWrapperFor(Class<?> iface) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclConnection: isWrapperFor(Class<?> iface) sNot supported yet.");
-    }
-}

File diff suppressed because it is too large
+ 0 - 3024
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCDatabaseMetaData.java


+ 0 - 98
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCDriver.java

@@ -1,98 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.sql.Connection;
-import java.sql.Driver;
-import java.sql.DriverManager;
-import java.sql.DriverPropertyInfo;
-import java.sql.SQLException;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-public class HPCCDriver implements Driver
-{
-    static
-    {
-        try
-        {
-            HPCCDriver driver = new HPCCDriver();
-            DriverManager.registerDriver(driver);
-            System.out.println("EclDriver initialized");
-        }
-        catch (SQLException ex)
-        {
-            ex.printStackTrace();
-        }
-    }
-
-    public HPCCDriver()
-    {
-    }
-
-    public Connection connect(String url, Properties info) throws SQLException
-    {
-        Properties connprops = new Properties();
-
-        if (info != null && info.size() > 0)
-            connprops.putAll(info);
-
-        try
-        {
-            StringTokenizer urltokens = new StringTokenizer(url, ";");
-            while (urltokens.hasMoreTokens())
-            {
-                String token = urltokens.nextToken();
-                if (token.contains("="))
-                {
-                    StringTokenizer keyvalues = new StringTokenizer(token, "=");
-                    while (keyvalues.hasMoreTokens())
-                    {
-                        String key = keyvalues.nextToken();
-                        String value = keyvalues.nextToken();
-                        if (!connprops.containsKey(key))
-                            connprops.put(key, value);
-                        else
-                            System.out.println("Connection property: " + key
-                                    + " found in info properties and URL, ignoring URL value");
-                    }
-                }
-            }
-        }
-        catch (Exception e)
-        {
-            System.out.println("Issue parsing URL! \"" + url + "\"");
-        }
-
-        String serverAddress = connprops.getProperty("ServerAddress");
-        System.out.println("EclDriver::connect" + serverAddress);
-
-        return new HPCCConnection(connprops);
-    }
-
-    public boolean acceptsURL(String url) throws SQLException
-    {
-        return true;
-    }
-
-    public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
-    {
-        DriverPropertyInfo[] infoArray = new DriverPropertyInfo[1];
-        infoArray[0] = new DriverPropertyInfo("ip", "IP Address");
-        return infoArray;
-    }
-
-    public int getMajorVersion()
-    {
-        return HPCCVersionTracker.HPCCMajor;
-    }
-
-    public int getMinorVersion()
-    {
-        return HPCCVersionTracker.HPCCMinor;
-    }
-
-    public boolean jdbcCompliant()
-    {
-        return true;
-    }
-
-}

+ 0 - 241
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCJDBCUtils.java

@@ -1,241 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.text.NumberFormat;
-import java.text.ParseException;
-import java.util.Locale;
-
-public class HPCCJDBCUtils
-{
-    public static NumberFormat format       = NumberFormat.getInstance(Locale.US);
-    static final char          pad          = '=';
-    static final char          BASE64_enc[] =
-                                            { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
-            'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i',
-            'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3',
-            '4', '5', '6', '7', '8', '9', '+', '"' };
-
-    static final char          BASE64_dec[] =
-                                            { (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x3e, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x3f, (char) 0x34, (char) 0x35, (char) 0x36, (char) 0x37, (char) 0x38,
-            (char) 0x39, (char) 0x3a, (char) 0x3b, (char) 0x3c, (char) 0x3d, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x01, (char) 0x02, (char) 0x03,
-            (char) 0x04, (char) 0x05, (char) 0x06, (char) 0x07, (char) 0x08, (char) 0x09, (char) 0x0a, (char) 0x0b,
-            (char) 0x0c, (char) 0x0d, (char) 0x0e, (char) 0x0f, (char) 0x10, (char) 0x11, (char) 0x12, (char) 0x13,
-            (char) 0x14, (char) 0x15, (char) 0x16, (char) 0x17, (char) 0x18, (char) 0x19, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x1a, (char) 0x1b, (char) 0x1c, (char) 0x1d,
-            (char) 0x1e, (char) 0x1f, (char) 0x20, (char) 0x21, (char) 0x22, (char) 0x23, (char) 0x24, (char) 0x25,
-            (char) 0x26, (char) 0x27, (char) 0x28, (char) 0x29, (char) 0x2a, (char) 0x2b, (char) 0x2c, (char) 0x2d,
-            (char) 0x2e, (char) 0x2f, (char) 0x30, (char) 0x31, (char) 0x32, (char) 0x33, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00, (char) 0x00,
-            (char) 0x00, (char) 0x00, (char) 0x00 };
-
-    // public static String Base64Decode(byte [] input)
-    // {
-    // StringBuilder out = new StringBuilder("");
-    //
-    // char c1, c2, c3, c4;
-    // char d1, d2, d3, d4;
-    //
-    // for(int i = 0;;)
-    // {
-    // c1 = (char)input[i++];
-    // if (c1 == 0)
-    // break;
-    // //else if (!isspace(c1))
-    // else if (!String.valueOf(c1).equals(" "))
-    // {
-    // c2 = (char)input[i++];
-    // c3 = (char)input[i++];
-    // c4 = (char)input[i++];
-    // d1 = BASE64_dec[c1];
-    // d2 = BASE64_dec[c2];
-    // d3 = BASE64_dec[c3];
-    // d4 = BASE64_dec[c4];
-    //
-    // out.append((char)((d1 << 2) | (d2 >> 4)));
-    //
-    // if(c3 == pad)
-    // break;
-    //
-    // out.append((char)((d2 << 4) | (d3 >> 2)));
-    //
-    // if(c4 == pad)
-    // break;
-    //
-    // out.append((char)((d3 << 6) | d4));
-    // }
-    // }
-    //
-    // return out.toString();
-    // }
-
-    public static String Base64Encode(byte[] input, boolean addLineBreaks)
-    {
-        int length = input.length;
-        StringBuilder out = new StringBuilder("");
-        char one;
-        char two;
-        char three;
-
-        int i;
-        for (i = 0; i < length && length - i >= 3;)
-        {
-            one = (char) input[i++];
-            two = (char) input[i++];
-            three = (char) input[i++];
-
-            out.append((char) BASE64_enc[one >> 2]);
-            out.append((char) BASE64_enc[((one << 4) & 0x30 | (two >> 4))]);
-            out.append((char) BASE64_enc[((two << 2) & 0x3c | (three >> 6))]);
-            out.append((char) BASE64_enc[three & 0x3f]);
-
-            if (addLineBreaks && (i % 54 == 0))
-                out.append("\n");
-
-            switch (length - i)
-            {
-                case 2:
-                    one = (char) input[i++];
-                    two = (char) input[i++];
-
-                    out.append((char) BASE64_enc[one >> 2]);
-                    out.append((char) BASE64_enc[((one << 4) & 0x30 | (two >> 4))]);
-                    out.append((char) BASE64_enc[((two << 2) & 0x3c)]);
-                    out.append(pad);
-                    break;
-
-                case 1:
-                    one = (char) input[i++];
-
-                    out.append((char) BASE64_enc[one >> 2]);
-                    out.append((char) BASE64_enc[((one << 4) & 0x30)]);
-                    out.append(pad);
-                    out.append(pad);
-                    break;
-            }
-
-        }
-        return out.toString();
-    }
-
-    public static String removeAllNewLines(String str)
-    {
-        return str.trim().replaceAll("\\r\\n|\\r|\\n", " ");
-    }
-
-    public static boolean isLiteralString(String str)
-    {
-        String trimmed = str.trim();
-        if (trimmed.charAt(0) != '\'' && trimmed.charAt(0) != '\"')
-            return false;
-        if (trimmed.charAt(trimmed.length() - 1) != '\'' && trimmed.charAt(trimmed.length() - 1) != '\"')
-            return false;
-
-        return true;
-    }
-
-    public static boolean isNumeric(String str)
-    {
-        try
-        {
-            format.parse(str);
-        }
-        catch (ParseException e)
-        {
-            return false;
-        }
-
-        return true;
-    }
-
-    public static long stringToLong(String str, long uponError)
-    {
-        try
-        {
-            Number num = format.parse(str);
-            return num.longValue();
-        }
-        catch (ParseException e)
-        {
-            return uponError;
-        }
-    }
-
-    public static int stringToInt(String str, int uponError)
-    {
-        try
-        {
-            Number num = format.parse(str);
-            return num.intValue();
-        }
-        catch (ParseException e)
-        {
-            return uponError;
-        }
-    }
-
-    public static String replaceAll(String input, String forReplace, String replaceWith)
-    {
-        if (input == null)
-            return "null";
-
-        StringBuffer result = new StringBuffer();
-        boolean hasMore = true;
-        while (hasMore)
-        {
-            int start = input.indexOf(forReplace);
-            int end = start + forReplace.length();
-            if (start != -1)
-            {
-                result.append(input.substring(0, start) + replaceWith);
-                input = input.substring(end);
-            }
-            else
-            {
-                hasMore = false;
-                result.append(input);
-            }
-        }
-        if (result.toString().equals(""))
-            return input; // nothing is changed
-        else
-            return result.toString();
-    }
-
-    public static String handleQuotedString(String quotedString)
-    {
-        if (quotedString == null)
-            return "null";
-        String retVal = quotedString;
-        if ((retVal.startsWith("'") && retVal.endsWith("'")))
-        {
-            if (!retVal.equals("''"))
-            {
-                retVal = retVal.substring(retVal.indexOf("'") + 1, retVal.lastIndexOf("'"));
-            }
-            else
-                retVal = "";
-        }
-        return retVal;
-    }
-}

+ 0 - 140
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCLogicalFiles.java

@@ -1,140 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Properties;
-
-public class HPCCLogicalFiles
-{
-    private Properties   files;
-    private List<String> superfiles;
-    private long         reportedFileCount;
-
-    public HPCCLogicalFiles()
-    {
-        files = new Properties();
-        superfiles = new ArrayList<String>();
-
-        reportedFileCount = 0;
-    }
-
-    public void putFile(String fullyQualifiedName, DFUFile file)
-    {
-        files.put(fullyQualifiedName, file);
-        if (file.isSuperFile())
-            superfiles.add(fullyQualifiedName);
-    }
-
-    public void putFile(DFUFile file)
-    {
-        files.put(file.getFullyQualifiedName(), file);
-        if (file.isSuperFile())
-            superfiles.add(file.getFullyQualifiedName());
-    }
-
-    public boolean containsFileName(String filename)
-    {
-        return files.containsKey(filename);
-    }
-
-    public DFUFile getFile(String filename)
-    {
-        return (DFUFile) files.get(filename);
-    }
-
-    public Enumeration<Object> getFiles()
-    {
-        return files.elements();
-    }
-
-    private String getSubfileRecDef(DFUFile superfile)
-    {
-        String eclrecdef = "";
-
-        List<String> subfiles = superfile.getSubfiles();
-        for (int y = 0; y < subfiles.size(); y++)
-        {
-            DFUFile subfile = ((DFUFile) files.get(subfiles.get(y)));
-            if (subfile.hasFileRecDef())
-            {
-                eclrecdef = subfile.getFileRecDef("recdef");
-                System.out.println("\tUsing record definition from: " + subfile.getFullyQualifiedName());
-                break;
-            }
-            else if (subfile.isSuperFile())
-            {
-                eclrecdef = getSubfileRecDef(subfile);
-                if (!eclrecdef.equals(""))
-                    break;
-            }
-        }
-
-        return eclrecdef;
-    }
-
-    public void updateSuperFile(String superfilename)
-    {
-        DFUFile superfile = (DFUFile) files.get(superfilename);
-        if (!superfile.hasFileRecDef())
-        {
-            if (superfile.containsSubfiles())
-            {
-                System.out.println("Processing superfile: " + superfile.getFullyQualifiedName());
-                superfile.setFileRecDef(getSubfileRecDef(superfile));
-                files.put(superfile.getFullyQualifiedName(), superfile);
-            }
-        }
-    }
-
-    public void updateSuperFiles()
-    {
-        int superfilescount = superfiles.size();
-        int superfilesupdated = 0;
-
-        for (int i = 0; i < superfilescount; i++)
-        {
-            DFUFile superfile = (DFUFile) files.get(superfiles.get(i));
-            if (!superfile.hasFileRecDef())
-            {
-                if (superfile.containsSubfiles())
-                {
-                    System.out.println("Processing superfile: " + superfile.getFullyQualifiedName());
-                    superfile.setFileRecDef(getSubfileRecDef(superfile));
-                    if (superfile.hasFileRecDef())
-                    {
-                        files.put(superfile.getFullyQualifiedName(), superfile);
-                        superfilesupdated++;
-                    }
-                }
-            }
-        }
-        System.out.println("Update superfiles' record definition ( " + superfilesupdated + " out of " + superfilescount
-                + " )");
-    }
-
-    public long getReportedFileCount()
-    {
-        return reportedFileCount;
-    }
-
-    public void setReportedFileCount(long reportedFileCount)
-    {
-        this.reportedFileCount = reportedFileCount;
-    }
-
-    public void setReportedFileCount(String reportedFileCountStr)
-    {
-        this.reportedFileCount = HPCCJDBCUtils.stringToLong(reportedFileCountStr, 0);
-    }
-
-    public int getCachedFileCount()
-    {
-        return files.size();
-    }
-
-    public int getCachedSuperFileCount()
-    {
-        return superfiles.size();
-    }
-}

+ 0 - 577
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCPreparedStatement.java

@@ -1,577 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.math.BigDecimal;
-import java.net.URL;
-import java.sql.Array;
-import java.sql.Blob;
-import java.sql.Clob;
-import java.sql.Connection;
-import java.sql.Date;
-import java.sql.NClob;
-import java.sql.ParameterMetaData;
-import java.sql.PreparedStatement;
-import java.sql.Ref;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.RowId;
-import java.sql.SQLException;
-import java.sql.SQLWarning;
-import java.sql.SQLXML;
-import java.sql.Time;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.HashMap;
-
-/**
- *
- * @author rpastrana
- */
-
-public class HPCCPreparedStatement implements PreparedStatement
-{
-    private boolean                  closed        = false;
-    private int                      maxRows       = 100;
-    private String                   query;
-    private Connection               connection;
-    private HashMap<Integer, Object> parameters    = new HashMap<Integer, Object>();
-    private ArrayList<SQLWarning>    warnings;
-    private HashMap<String, String>  indexToUseMap = new HashMap<String, String>();
-
-    private HPCCResultSet            result;
-
-    public HPCCPreparedStatement(Connection connection, String query)
-    {
-        System.out.println("ECLPreparedStatement::ECLPreparedStatement: " + query);
-        this.query = query;
-        this.connection = connection;
-        warnings = new ArrayList<SQLWarning>();
-    }
-
-    public boolean isIndexSet(String sourcefilename)
-    {
-        return indexToUseMap.get(sourcefilename) != null;
-    }
-
-    public void setIndexToUse(String sourcefilename, String indexfilename)
-    {
-        indexToUseMap.put(sourcefilename, indexfilename);
-    }
-
-    public String getIndexToUse(String sourcefilename)
-    {
-        return indexToUseMap.get(sourcefilename);
-    }
-
-    public ResultSet executeQuery() throws SQLException
-    {
-        return new HPCCResultSet(this, query, parameters);
-    }
-
-    public int executeUpdate() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT: executeUpdate Not supported yet.");
-    }
-
-    public void setNull(int parameterIndex, int sqlType) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), sqlType);
-    }
-
-    public void setBoolean(int parameterIndex, boolean x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setByte(int parameterIndex, byte x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setShort(int parameterIndex, short x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setInt(int parameterIndex, int x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setLong(int parameterIndex, long x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setFloat(int parameterIndex, float x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setDouble(int parameterIndex, double x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setBigDecimal(int parameterIndex, BigDecimal x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setString(int parameterIndex, String x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setBytes(int parameterIndex, byte[] x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setDate(int parameterIndex, Date x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setTime(int parameterIndex, Time x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setAsciiStream(int parameterIndex, InputStream x, int length) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT: setAsciiStream Not supported yet.");
-    }
-
-    public void setUnicodeStream(int parameterIndex, InputStream x, int length) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT: setUnicodeStream Not supported yet.");
-    }
-
-    public void setBinaryStream(int parameterIndex, InputStream x, int length) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT: setBinaryStream Not supported yet.");
-    }
-
-    public void clearParameters() throws SQLException
-    {
-        parameters.clear();
-    }
-
-    public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException
-    {
-        System.out.println("ECLPrepStamt::setObject Parameter Index = " + parameterIndex + ", Object = " + x
-                + ", targetSqlType = " + targetSqlType);
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setObject(int parameterIndex, Object x) throws SQLException
-    {
-        System.out.println("ECLPrepStamt::setObject Parameter Index = " + parameterIndex + ", Object = " + x);
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public boolean execute() throws SQLException
-    {
-        result = new HPCCResultSet(this, query, parameters);
-        System.out.println("ECLPreparedStatement: execute rowcount: " + result.getRowCount());
-        return result.getRowCount() > 0 ? true : false;
-    }
-
-    public void addBatch() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT: addBatch Not supported yet.");
-    }
-
-    public void setCharacterStream(int parameterIndex, Reader reader, int length) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setCharacterStream Not supported yet.");
-    }
-
-    public void setRef(int parameterIndex, Ref x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setBlob(int parameterIndex, Blob x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setClob(int parameterIndex, Clob x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setArray(int parameterIndex, Array x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public ResultSetMetaData getMetaData() throws SQLException
-    {
-        System.out.println("ECLPreparedStatement: getMetaData");
-        return result.getMetaData();
-    }
-
-    public void setDate(int parameterIndex, Date x, Calendar cal) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setDate Not supported yet.");
-    }
-
-    public void setTime(int parameterIndex, Time x, Calendar cal) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setTime Not supported yet.");
-    }
-
-    public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setTimestamp Not supported yet.");
-    }
-
-    public void setNull(int parameterIndex, int sqlType, String typeName) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setNull Not supported yet.");
-    }
-
-    public void setURL(int parameterIndex, URL x) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public ParameterMetaData getParameterMetaData() throws SQLException
-    {
-        System.out.println("ECLPREPSTATEMENT getParameterMetaData");
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:getParameterMetaData Not supported yet.");
-    }
-
-    public void setRowId(int parameterIndex, RowId x) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setRowId Not supported yet.");
-    }
-
-    public void setNString(int parameterIndex, String value) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), value);
-    }
-
-    public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setNCharacterStream Not supported yet.");
-    }
-
-    public void setNClob(int parameterIndex, NClob value) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), value);
-    }
-
-    public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setClob Not supported yet.");
-    }
-
-    public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setBlob Not supported yet.");
-    }
-
-    public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setNClob Not supported yet.");
-    }
-
-    public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
-    {
-        parameters.put(new Integer(parameterIndex), xmlObject);
-    }
-
-    public void setObject(int parameterIndex, Object x, int targetSqlType, int scaleOrLength) throws SQLException
-    {
-        System.out.println("ECLPrepStamt::setObject Parameter Index = " + parameterIndex + ", Object = " + x
-                + ", targetSqlType = " + targetSqlType + ", scaleOrLength = " + scaleOrLength);
-        parameters.put(new Integer(parameterIndex), x);
-    }
-
-    public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setAsciiStream Not supported yet.");
-    }
-
-    public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setBinaryStream Not supported yet.");
-    }
-
-    public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setCharacterStream Not supported yet.");
-    }
-
-    public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setAsciiStream Not supported yet.");
-    }
-
-    public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setBinaryStream Not supported yet.");
-    }
-
-    public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setCharacterStream Not supported yet.");
-    }
-
-    public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setNCharacterStream Not supported yet.");
-    }
-
-    public void setClob(int parameterIndex, Reader reader) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setClob Not supported yet.");
-    }
-
-    public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setBlob Not supported yet.");
-    }
-
-    public void setNClob(int parameterIndex, Reader reader) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setNClob Not supported yet.");
-    }
-
-    public ResultSet executeQuery(String query) throws SQLException
-    {
-        System.out.println("ECLPreparedStatement: executeQuery(" + query + ")");
-        result = new HPCCResultSet(this, query, parameters);
-        System.out.println("ECLPreparedStatement: executeQuery returned " + result.getRowCount() + " rows, and "
-                + result.getMetaData().getColumnCount() + " columns");
-        System.out.println("results object id: " + (Object) result.hashCode());
-
-        return result;
-    }
-
-    public int executeUpdate(String sql) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:executeUpdate Not supported yet.");
-    }
-
-    public void close() throws SQLException
-    {
-        connection.close();
-        query = "";
-        result = null;
-        closed = true;
-    }
-
-    public int getMaxFieldSize() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT: getMaxFieldSizeNot supported yet.");
-    }
-
-    public void setMaxFieldSize(int max) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setMaxFieldSize Not supported yet.");
-    }
-
-    public int getMaxRows() throws SQLException
-    {
-        return maxRows;
-    }
-
-    public void setMaxRows(int max) throws SQLException
-    {
-        maxRows = max;
-    }
-
-    public void setEscapeProcessing(boolean enable) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setEscapeProcessing Not supported yet.");
-    }
-
-    public int getQueryTimeout() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:getQueryTimeout Not supported yet.");
-    }
-
-    public void setQueryTimeout(int seconds) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setQueryTimeout Not supported yet.");
-    }
-
-    public void cancel() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:cancel Not supported yet.");
-    }
-
-    public SQLWarning getWarnings() throws SQLException
-    {
-        return (warnings.size() <= 0) ? null : warnings.get(1);
-    }
-
-    public void clearWarnings() throws SQLException
-    {
-        warnings.clear();
-    }
-
-    public void setCursorName(String name) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setCursorName Not supported yet.");
-    }
-
-    public boolean execute(String sql) throws SQLException
-    {
-        System.out.println("ECLPREPSTMT execute(" + sql + ")");
-        query = sql;
-        result = new HPCCResultSet(this, query, parameters);
-        System.out.println("ECLPreparedStatement: execute rowcount: " + result.getRowCount());
-        return result.getRowCount() > 0 ? true : false;
-    }
-
-    public ResultSet getResultSet() throws SQLException
-    {
-        return result;
-    }
-
-    public int getUpdateCount() throws SQLException
-    {
-        return 0;
-    }
-
-    public boolean getMoreResults() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:getMoreResults Not supported yet.");
-    }
-
-    public void setFetchDirection(int direction) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setFetchDirection Not supported yet.");
-    }
-
-    public int getFetchDirection() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:getFetchDirection Not supported yet.");
-    }
-
-    public void setFetchSize(int rows) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setFetchSize Not supported yet.");
-    }
-
-    public int getFetchSize() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:getFetchSize Not supported yet.");
-    }
-
-    public int getResultSetConcurrency() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:getResultSetConcurrency Not supported yet.");
-    }
-
-    public int getResultSetType() throws SQLException
-    {
-        return ResultSet.TYPE_FORWARD_ONLY;
-    }
-
-    public void addBatch(String sql) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:addBatch Not supported yet.");
-    }
-
-    public void clearBatch() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:clearBatch Not supported yet.");
-    }
-
-    public int[] executeBatch() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:executeBatch Not supported yet.");
-    }
-
-    public Connection getConnection() throws SQLException
-    {
-        return connection;
-    }
-
-    public boolean getMoreResults(int current) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:getMoreResults Not supported yet.");
-    }
-
-    public ResultSet getGeneratedKeys() throws SQLException
-    {
-        return null;
-    }
-
-    public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:executeUpdate Not supported yet.");
-    }
-
-    public int executeUpdate(String sql, int[] columnIndexes) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:executeUpdate Not supported yet.");
-    }
-
-    public int executeUpdate(String sql, String[] columnNames) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:executeUpdate Not supported yet.");
-    }
-
-    public boolean execute(String sql, int autoGeneratedKeys) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "ECLPREPSTATEMNT:execute(String sql, int autoGeneratedKeys) Not supported yet.");
-    }
-
-    public boolean execute(String sql, int[] columnIndexes) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "ECLPREPSTATEMNT:execute(String sql, int[] columnIndexes) Not supported yet.");
-    }
-
-    public boolean execute(String sql, String[] columnNames) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "ECLPREPSTATEMNT:execute(String sql, String[] columnNames) Not supported yet.");
-    }
-
-    public int getResultSetHoldability() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:getResultSetHoldability Not supported yet.");
-    }
-
-    public boolean isClosed() throws SQLException
-    {
-        return closed;
-    }
-
-    public void setPoolable(boolean poolable) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:setPoolable Not supported yet.");
-    }
-
-    public boolean isPoolable() throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:isPoolable Not supported yet.");
-    }
-
-    public <T> T unwrap(Class<T> iface) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:unwrap Not supported yet.");
-    }
-
-    public boolean isWrapperFor(Class<?> iface) throws SQLException
-    {
-        throw new UnsupportedOperationException("ECLPREPSTATEMNT:isWrapperFor Not supported yet.");
-    }
-}

+ 0 - 69
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCQueries.java

@@ -1,69 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.util.Enumeration;
-import java.util.Properties;
-
-public class HPCCQueries
-{
-
-    private Properties queries;
-
-    public HPCCQueries()
-    {
-        queries = new Properties();
-    }
-
-    public void put(HPCCQuery query)
-    {
-        queries.put(query.getQuerySet() + "::" + query.getName(), query);
-    }
-
-    public Enumeration<Object> getQueries()
-    {
-        return queries.elements();
-    }
-
-    public HPCCQuery getQuerysetQuery(String eclqueryname)
-    {
-        String querysplit[] = eclqueryname.split("::");
-        if (querysplit.length > 2)
-        {
-            String name = "";
-            for (int i = 1; i < querysplit.length; i++)
-                name += "::" + querysplit[i];
-
-            return getQuery(querysplit[0], name);
-        }
-        else if (querysplit.length == 2)
-            return getQuery(querysplit[0], querysplit[1]);
-        else if (querysplit.length == 1)
-            return getQuery(querysplit[0]);
-        else
-            return null;
-    }
-
-    public HPCCQuery getQuery(String queryset, String eclqueryname)
-    {
-        return (HPCCQuery) queries.get(queryset + "::" + eclqueryname);
-    }
-
-    public HPCCQuery getQuery(String eclqueryname)
-    {
-        return (HPCCQuery) queries.get(eclqueryname);
-    }
-
-    public int getLength()
-    {
-        return queries.size();
-    }
-
-    public boolean containsQueryName(String eclqueryname)
-    {
-        return queries.containsKey(eclqueryname);
-    }
-
-    public boolean containsQueryName(String clustername, String eclqueryname)
-    {
-        return queries.containsKey((clustername.length() > 0 ? clustername + "::" : "") + eclqueryname);
-    }
-}

+ 0 - 291
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCQuery.java

@@ -1,291 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.sql.DatabaseMetaData;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-public class HPCCQuery
-{
-    private String                   ID;
-    private String                   Name;
-    private String                   WUID;
-    private String                   DLL;
-    private String                   Alias;
-    private String                   QuerySet;
-
-    private boolean                  Suspended;
-    private List<String>             ResultDatasets;
-    private List<HPCCColumnMetaData> schema;
-    private String                   defaulttable;
-    private List<HPCCColumnMetaData> defaultfields;
-
-    private final static String      DEFAULTDATASETNAME = "BIOUTPUT";
-
-    public HPCCQuery()
-    {
-        ID = "";
-        Name = "";
-        WUID = "";
-        Suspended = false;
-        Alias = "";
-        QuerySet = "";
-        ResultDatasets = new ArrayList<String>();
-        schema = new ArrayList<HPCCColumnMetaData>();
-        defaulttable = null;
-        defaultfields = new ArrayList<HPCCColumnMetaData>();
-    }
-
-    public String getAlias()
-    {
-        return Alias;
-    }
-
-    public void setAlias(String alias)
-    {
-        Alias = alias;
-    }
-
-    public String[] getAllTableFieldsStringArray(String tablename)
-    {
-        String fields[] = new String[defaultfields.size()];
-        int i = 0;
-        Iterator<HPCCColumnMetaData> it = defaultfields.iterator();
-        while (it.hasNext())
-        {
-            HPCCColumnMetaData field = (HPCCColumnMetaData) it.next();
-            fields[i++] = field.getColumnName();
-        }
-
-        return fields;
-    }
-
-    public void addResultElement(HPCCColumnMetaData elem) throws Exception
-    {
-        if (defaulttable != null)
-        {
-            if (elem.getTableName().equalsIgnoreCase(defaulttable)
-                    || elem.getParamType() == DatabaseMetaData.procedureColumnIn)
-            {
-                defaultfields.add(elem);
-            }
-
-            schema.add(elem);
-        }
-        else
-            throw new Exception("Cannot add Result Elements before adding Result Dataset");
-
-    }
-
-    public void addResultDataset(String ds)
-    {
-        if (defaulttable == null || ds.equalsIgnoreCase(DEFAULTDATASETNAME))
-        {
-            defaulttable = ds;
-            defaultfields.clear();
-        }
-        ResultDatasets.add(ds);
-    }
-
-    public List<String> getAllTables()
-    {
-        return ResultDatasets;
-    }
-
-    public List<HPCCColumnMetaData> getAllFields()
-    {
-        return defaultfields;
-    }
-
-    public String getID()
-    {
-        return ID;
-    }
-
-    public void setID(String iD)
-    {
-        ID = iD;
-    }
-
-    public String getName()
-    {
-        return Name;
-    }
-
-    public void setName(String name)
-    {
-        Name = name;
-    }
-
-    public String getWUID()
-    {
-        return WUID;
-    }
-
-    public void setWUID(String wUID)
-    {
-        WUID = wUID;
-    }
-
-    public String getDLL()
-    {
-        return DLL;
-    }
-
-    public void setDLL(String dLL)
-    {
-        DLL = dLL;
-    }
-
-    public boolean isSuspended()
-    {
-        return Suspended;
-    }
-
-    public void setSuspended(boolean suspended)
-    {
-        Suspended = suspended;
-    }
-
-    @Override
-    public String toString()
-    {
-        String tmp = Name + " " + WUID;
-
-        tmp += "tables: {";
-        Iterator<String> iterator = ResultDatasets.iterator();
-        while (iterator.hasNext())
-        {
-            tmp += " " + iterator.next();
-        }
-
-        tmp += "}";
-
-        tmp += "elements: {";
-        Iterator<HPCCColumnMetaData> iterator2 = schema.iterator();
-        while (iterator2.hasNext())
-        {
-            tmp += " " + iterator2.next();
-        }
-
-        tmp += "}";
-
-        return tmp;
-    }
-
-    public boolean containsField(String tablename, String fieldname)
-    {
-        Iterator<HPCCColumnMetaData> it = defaultfields.iterator();
-        while (it.hasNext())
-        {
-            HPCCColumnMetaData field = (HPCCColumnMetaData) it.next();
-            if (field.getTableName().equalsIgnoreCase(tablename) && field.getColumnName().equalsIgnoreCase(fieldname))
-                return true;
-        }
-
-        return false;
-    }
-
-    public HPCCColumnMetaData getFieldMetaData(String fieldname)
-    {
-        Iterator<HPCCColumnMetaData> it = schema.iterator();
-        while (it.hasNext())
-        {
-            HPCCColumnMetaData field = (HPCCColumnMetaData) it.next();
-            if (field.getColumnName().equalsIgnoreCase(fieldname))
-                return field;
-        }
-
-        return null;
-    }
-
-    public Iterator<HPCCColumnMetaData> getColumnsMetaDataIterator()
-    {
-        return schema.iterator();
-    }
-
-    public String getDefaultTableName()
-    {
-        return defaulttable;
-    }
-
-    public boolean containsField(String fieldname)
-    {
-        Iterator<HPCCColumnMetaData> it = defaultfields.iterator();
-        while (it.hasNext())
-        {
-            HPCCColumnMetaData field = (HPCCColumnMetaData) it.next();
-            if (field.getColumnName().equalsIgnoreCase(fieldname))
-                return true;
-        }
-
-        return false;
-    }
-
-    public ArrayList<HPCCColumnMetaData> getAllNonInFields()
-    {
-        ArrayList<HPCCColumnMetaData> expectedretcolumns = new ArrayList();
-
-        Iterator<HPCCColumnMetaData> it = defaultfields.iterator();
-        while (it.hasNext())
-        {
-            HPCCColumnMetaData field = (HPCCColumnMetaData) it.next();
-            if (field.getParamType() != HPCCDatabaseMetaData.procedureColumnIn)
-                expectedretcolumns.add(field);
-        }
-
-        return expectedretcolumns;
-    }
-
-    public ArrayList<HPCCColumnMetaData> getAllInFields()
-    {
-        ArrayList<HPCCColumnMetaData> inparams = new ArrayList();
-
-        Iterator<HPCCColumnMetaData> it = defaultfields.iterator();
-        while (it.hasNext())
-        {
-            HPCCColumnMetaData field = (HPCCColumnMetaData) it.next();
-            if (field.getParamType() == HPCCDatabaseMetaData.procedureColumnIn)
-                inparams.add(field);
-        }
-
-        return inparams;
-    }
-
-    public String getQuerySet()
-    {
-        return QuerySet;
-    }
-
-    public void setQueryset(String qsname)
-    {
-        QuerySet = qsname;
-    }
-
-    public boolean isQueryNameMatch(String fullname)
-    {
-        String querysplit[] = fullname.split("::");
-        String inname = "";
-        String inqs = "";
-        if (querysplit.length > 2)
-        {
-            for (int i = 1; i < querysplit.length; i++)
-                inname += "::" + querysplit[i];
-            inqs = querysplit[0];
-        }
-        else if (querysplit.length == 2)
-        {
-            inqs = querysplit[0];
-            inname = querysplit[1];
-        }
-        else if (querysplit.length == 1)
-            inname = querysplit[0];
-        else
-            return false;
-
-        if (!inname.equalsIgnoreCase(this.Name) || (inqs.length() > 0 && !inqs.equalsIgnoreCase(this.QuerySet)))
-            return false;
-
-        return true;
-    }
-}

File diff suppressed because it is too large
+ 0 - 1957
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCResultSet.java


+ 0 - 205
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCResultSetMetadata.java

@@ -1,205 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-
-public class HPCCResultSetMetadata implements ResultSetMetaData
-{
-
-    private List<HPCCColumnMetaData> columnList;
-    private String                   tableName;
-    private String                   schemaName  = "HPCC";
-    private String                   catalogName = "roxie";
-
-    public HPCCResultSetMetadata(List<HPCCColumnMetaData> columnList, String tableName)
-    {
-        this.columnList = columnList;
-        this.tableName = tableName;
-    }
-
-    @SuppressWarnings("rawtypes")
-    public ArrayList createDefaultResultRow()
-    {
-        ArrayList rowValues = new ArrayList();
-
-        for (int i = 0; i < columnList.size(); i++)
-        {
-            // some columns might not be nullable!
-            // rowValues.add(i, new Object());
-            if (columnList.get(i).isConstant())
-                rowValues.add(i, columnList.get(i).getConstantValue());
-            else
-                rowValues.add(i, null);
-        }
-        return rowValues;
-    }
-
-    public int getColumnCount() throws SQLException
-    {
-        return columnList.size();
-    }
-
-    public boolean isAutoIncrement(int column) throws SQLException
-    {
-        return false;
-    }
-
-    public boolean isCaseSensitive(int column) throws SQLException
-    {
-        return false;
-    }
-
-    public boolean isSearchable(int column) throws SQLException
-    {
-        return false;
-    }
-
-    public boolean isCurrency(int column) throws SQLException
-    {
-        return false;
-    }
-
-    public int isNullable(int column) throws SQLException
-    {
-        return 1;
-    }
-
-    public boolean isSigned(int column) throws SQLException
-    {
-        return false;
-    }
-
-    public int getColumnDisplaySize(int column) throws SQLException
-    {
-        return 255;
-    }
-
-    public String getColumnLabel(int column) throws SQLException
-    {
-        if (column >= 1 && column <= columnList.size())
-            return columnList.get(column - 1).getColumnNameOrAlias();
-        else
-            throw new SQLException("Invalid Column Index = " + column);
-    }
-
-    public String getColumnName(int column) throws SQLException
-    {
-        if (column >= 1 && column <= columnList.size())
-            return columnList.get(column - 1).getColumnName();
-        else
-            throw new SQLException("Invalid Column Index = column");
-    }
-
-    public String getSchemaName(int column) throws SQLException
-    {
-        return schemaName;
-    }
-
-    public int getPrecision(int column) throws SQLException
-    {
-        return 0;
-    }
-
-    public int getScale(int column) throws SQLException
-    {
-        return 0;
-    }
-
-    public String getTableName(int column) throws SQLException
-    {
-        return tableName;
-    }
-
-    public String getCatalogName(int column) throws SQLException
-    {
-        return catalogName;
-    }
-
-    public int getColumnType(int column) throws SQLException
-    {
-        if (column >= 1 && column <= columnList.size())
-            return columnList.get(column - 1).getSqlType();
-        else
-            throw new SQLException("Invalid Column Index = " + column);
-    }
-
-    public String getColumnTypeName(int column) throws SQLException
-    {
-        if (column >= 1 && column <= columnList.size())
-            return HPCCDatabaseMetaData.getFieldName(columnList.get(column - 1).getSqlType());
-        else
-            throw new SQLException("Invalid Column Index = " + column);
-    }
-
-    public boolean isReadOnly(int column) throws SQLException
-    {
-        return true;
-    }
-
-    public boolean isWritable(int column) throws SQLException
-    {
-        return false;
-    }
-
-    public boolean isDefinitelyWritable(int column) throws SQLException
-    {
-        return false;
-    }
-
-    public String getColumnClassName(int column) throws SQLException
-    {
-        if (column >= 1 && column <= columnList.size())
-        {
-            return HPCCDatabaseMetaData.convertSQLtype2JavaClassName(columnList.get(column - 1).getSqlType());
-        }
-        else
-        {
-            throw new SQLException("Invalid Column Index = " + column);
-        }
-    }
-
-    public <T> T unwrap(Class<T> iface) throws SQLException
-    {
-        throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    public boolean isWrapperFor(Class<?> iface) throws SQLException
-    {
-        throw new UnsupportedOperationException("Not supported yet.");
-    }
-
-    public int getColumnIndex(String columnLabel)
-    {
-        int colindex = -1;
-        try
-        {
-            int columCount = this.getColumnCount();
-            for (int col = 1; col <= columCount; col++)
-            {
-                if (this.getColumnLabel(col).equalsIgnoreCase(columnLabel))
-                {
-                    colindex = col;
-                    break;
-                }
-            }
-        }
-        catch (SQLException e)
-        {
-        }
-
-        return colindex;
-    }
-
-    public String[] getInParamNames()
-    {
-        String[] inparams = new String[this.columnList.size()];
-        for (int i = 0; i < columnList.size(); i++)
-        {
-            inparams[i] = columnList.get(i).getColumnName();
-        }
-
-        return inparams;
-    }
-}

+ 0 - 233
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCStatement.java

@@ -1,233 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.SQLWarning;
-import java.sql.Statement;
-
-/**
- *
- * @author ChalaAX, rpastrana
- */
-
-public class HPCCStatement implements Statement
-{
-
-    public ResultSet executeQuery(String sql) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: executeQuery(String sql) Not supported yet.");
-    }
-
-    public int executeUpdate(String sql) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: executeUpdate(String sql) Not supported yet.");
-    }
-
-    public void close() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: close() Not supported yet.");
-    }
-
-    public int getMaxFieldSize() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: getMaxFieldSize() Not supported yet.");
-    }
-
-    public void setMaxFieldSize(int max) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: setMaxFieldSize(int max) Not supported yet.");
-    }
-
-    public int getMaxRows() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: getMaxRows() Not supported yet.");
-    }
-
-    public void setMaxRows(int max) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: setMaxRows(int max) Not supported yet.");
-    }
-
-    public void setEscapeProcessing(boolean enable) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: setEscapeProcessing(boolean enable) Not supported yet.");
-    }
-
-    public int getQueryTimeout() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement:  getQueryTimeout() Not supported yet.");
-    }
-
-    public void setQueryTimeout(int seconds) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: setQueryTimeout(int seconds) Not supported yet.");
-    }
-
-    public void cancel() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: cancel()  Not supported yet.");
-    }
-
-    public SQLWarning getWarnings() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: getWarnings Not supported yet.");
-    }
-
-    public void clearWarnings() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: clearWarnings() Not supported yet.");
-    }
-
-    public void setCursorName(String name) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement:  setCursorName(String name) Not supported yet.");
-    }
-
-    public boolean execute(String sql) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: execute(String sql) Not supported yet.");
-    }
-
-    public ResultSet getResultSet() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: getResultSet Not supported yet.");
-    }
-
-    public int getUpdateCount() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement:getUpdateCount  Not supported yet.");
-    }
-
-    public boolean getMoreResults() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: getMoreResults Not supported yet.");
-    }
-
-    public void setFetchDirection(int direction) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: only ResultSet.FETCH_FORWARD supported");
-    }
-
-    public int getFetchDirection() throws SQLException
-    {
-        return ResultSet.FETCH_FORWARD;
-    }
-
-    public void setFetchSize(int rows) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: setFetchSize(int rows) Not supported yet.");
-    }
-
-    public int getFetchSize() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: getFetchSize() Not supported yet.");
-    }
-
-    public int getResultSetConcurrency() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: getResultSetConcurrency() Not supported yet.");
-    }
-
-    public int getResultSetType() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement:  getResultSetType() Not supported yet.");
-    }
-
-    public void addBatch(String sql) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: addBatch(String sql) Not supported yet.");
-    }
-
-    public void clearBatch() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: clearBatch() Not supported yet.");
-    }
-
-    public int[] executeBatch() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: executeBatch() Not supported yet.");
-    }
-
-    public Connection getConnection() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: getConnection() Not supported yet.");
-    }
-
-    public boolean getMoreResults(int current) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: getMoreResults(int current) Not supported yet.");
-    }
-
-    public ResultSet getGeneratedKeys() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: getGeneratedKeys() Not supported yet.");
-    }
-
-    public int executeUpdate(String sql, int autoGeneratedKeys) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclStatement: executeUpdate(String sql, int autoGeneratedKeys) Not supported yet.");
-    }
-
-    public int executeUpdate(String sql, int[] columnIndexes) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclStatement:  executeUpdate(String sql, int[] columnIndexes) Not supported yet.");
-    }
-
-    public int executeUpdate(String sql, String[] columnNames) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclStatement: executeUpdate(String sql, String[] columnNames) Not supported yet.");
-    }
-
-    public boolean execute(String sql, int autoGeneratedKeys) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclStatement: execute(String sql, int autoGeneratedKeys) Not supported yet.");
-    }
-
-    public boolean execute(String sql, int[] columnIndexes) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclStatement:  execute(String sql, int[] columnIndexes) Not supported yet.");
-    }
-
-    public boolean execute(String sql, String[] columnNames) throws SQLException
-    {
-        throw new UnsupportedOperationException(
-                "EclStatement: execute(String sql, String[] columnNames) Not supported yet.");
-    }
-
-    public int getResultSetHoldability() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: getResultSetHoldability Not supported yet.");
-    }
-
-    public boolean isClosed() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: isClosed() Not supported yet.");
-    }
-
-    public void setPoolable(boolean poolable) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: Not supported yet.");
-    }
-
-    public boolean isPoolable() throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: Not supported yet.");
-    }
-
-    public <T> T unwrap(Class<T> iface) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: Not supported yet.");
-    }
-
-    public boolean isWrapperFor(Class<?> iface) throws SQLException
-    {
-        throw new UnsupportedOperationException("EclStatement: Not supported yet.");
-    }
-
-}

+ 0 - 11
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/HPCCVersionTracker.java.in

@@ -1,11 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-public class HPCCVersionTracker
-{
-    static final String HPCCProject     = "${HPCC_PROJECT}";
-    static final int HPCCMajor          = ${HPCC_MAJOR};
-    static final int HPCCMinor          = ${HPCC_MINOR};
-    static final int HPCCPoint          = ${HPCC_POINT};
-    static final String HPCCPMaturity   = "${HPCC_POINT}";
-    static final int HPCCSequence       = ${HPCC_SEQUENCE};
-}

+ 0 - 169
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLColumn.java

@@ -1,169 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.util.List;
-
-public class SQLColumn
-{
-    private String          name;
-    private String          alias;
-    private String          parenttable;
-    private int             type;
-    private List<SQLColumn> functionParams;
-    private String          constVal;
-    private int             position;
-
-    final static int        UNKNOWN_COLUMN_TYPE   = -1;
-    final static int        CONST_COLUMN_TYPE     = 1;
-    final static int        FIELDNAME_COLUMN_TYPE = 2;
-    final static int        FUNCTION_COLUMN_TYPE  = 3;
-
-    public SQLColumn()
-    {
-        name = null;
-        alias = null;
-        parenttable = null;
-        type = UNKNOWN_COLUMN_TYPE;
-        functionParams = null;
-        constVal = null;
-        position = -1;
-    }
-
-    public SQLColumn(String fullname, int coltype, int position)
-    {
-        String[] nameparts = name.split("\\.");
-        if (nameparts.length > 1)
-        {
-            parenttable = nameparts[0];
-        }
-        else
-            parenttable = null;
-
-        this.name = nameparts[nameparts.length - 1];
-        alias = null;
-        functionParams = null;
-        type = coltype;
-        constVal = null;
-        this.position = position;
-    }
-
-    public SQLColumn(String fullname, int position)
-    {
-
-        String[] nameparts = fullname.split("\\.");
-        if (nameparts.length > 1)
-        {
-            parenttable = nameparts[0];
-        }
-        else
-            parenttable = null;
-
-        this.name = nameparts[nameparts.length - 1];
-        alias = null;
-        type = UNKNOWN_COLUMN_TYPE;
-        functionParams = null;
-        constVal = null;
-        this.position = position;
-    }
-
-    public SQLColumn(String parentname, String columnname, int position)
-    {
-        parenttable = parentname;
-        this.name = columnname;
-        alias = null;
-        type = FIELDNAME_COLUMN_TYPE;
-        functionParams = null;
-        constVal = null;
-        this.position = position;
-    }
-
-    public SQLColumn(String columnname, List<SQLColumn> funcols, int position)
-    {
-        this.name = columnname;
-        alias = null;
-        type = FUNCTION_COLUMN_TYPE;
-        functionParams = funcols;
-        constVal = null;
-        this.position = position;
-    }
-
-    public SQLColumn(String columnname, String constVal, String alias, int position)
-    {
-        this.name = columnname;
-        this.alias = alias;
-        type = CONST_COLUMN_TYPE;
-        functionParams = null;
-        this.constVal = constVal;
-        this.position = position;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName(String name)
-    {
-        this.name = name;
-    }
-
-    public String getAlias()
-    {
-        return alias;
-    }
-
-    public void setAlias(String alias)
-    {
-        this.alias = alias;
-    }
-
-    public String getParenttable()
-    {
-        return parenttable;
-    }
-
-    public void setParenttable(String parenttable)
-    {
-        this.parenttable = parenttable;
-    }
-
-    public int getType()
-    {
-        return type;
-    }
-
-    public void setType(int type)
-    {
-        this.type = type;
-    }
-
-    public List<SQLColumn> getFunctionParams()
-    {
-        return functionParams;
-    }
-
-    public void setFunctionParams(List<SQLColumn> functionParams)
-    {
-        this.functionParams = functionParams;
-    }
-
-    public String getConstVal()
-    {
-        return constVal;
-    }
-
-    public void setConstVal(String constVal)
-    {
-        this.constVal = constVal;
-    }
-
-    public int getPosition()
-    {
-        return position;
-    }
-
-    public void setPosition(int position)
-    {
-        this.position = position;
-    }
-
-}

+ 0 - 209
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLExpressionFragment.java

@@ -1,209 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.util.HashMap;
-
-public class SQLExpressionFragment
-{
-    public static final int    LOGICAL_OPERATOR_TYPE   = 1;
-    public static final int    LOGICAL_EXPRESSION_TYPE = 2;
-
-    private static final short PARENT_INDEX            = 0;
-    private static final short VALUE_INDEX              = 1;
-    private String[]           prefix;
-    private String[]           postfix;
-
-    private SQLOperator        operator;
-    private int                type;
-    private boolean            isParametrized;
-
-    public SQLExpressionFragment(String operator)
-    {
-        this.operator = new SQLOperator(operator);
-        type = LOGICAL_OPERATOR_TYPE;
-        isParametrized = false;
-        prefix = new String[2];
-        postfix = new String[2];
-    }
-
-    public SQLExpressionFragment(int type)
-    {
-        operator = null;
-        this.type = type;
-        isParametrized = false;
-        prefix = new String[2];
-        postfix = new String[2];
-    }
-
-    public int getType()
-    {
-        return type;
-    }
-
-    public String getPrefixParent()
-    {
-        return prefix[PARENT_INDEX];
-    }
-
-    public String getPrefixValue()
-    {
-        return prefix[VALUE_INDEX];
-    }
-
-    public String getFullPrefix()
-    {
-        return getPrefixParent() + "." + getPrefixValue();
-    }
-
-    public String getFullPostfix()
-    {
-        return getPostfixParent() + "." + getPostfixValue();
-    }
-
-    public void setPrefix(String prefix)
-    {
-        this.prefix = parseExpressionFragment(prefix);
-    }
-
-    public SQLOperator getOperator()
-    {
-        return operator;
-    }
-
-    public void setOperator(SQLOperator operator)
-    {
-        this.operator = operator;
-    }
-
-    public void setOperator(String operator)
-    {
-        this.operator = new SQLOperator(operator);
-    }
-
-    public boolean isOperatorValid()
-    {
-        return operator != null ? operator.isValid() : false;
-    }
-
-    public String getPostfixValue()
-    {
-        return postfix[VALUE_INDEX];
-    }
-
-    public String getPostfixParent()
-    {
-        return postfix[PARENT_INDEX];
-    }
-
-    private String[] parseExpressionFragment(String fragment)
-    {
-        String[] parsedFrag = new String[2];
-
-        if (fragment == null || fragment.length() <= 0)
-        {
-            parsedFrag[PARENT_INDEX] = "";
-            parsedFrag[VALUE_INDEX] = "";
-        }
-        else
-            if (!HPCCJDBCUtils.isLiteralString(fragment) && !HPCCJDBCUtils.isNumeric(fragment) )
-        {
-
-            String fragsplit[] = fragment.split("\\.", 2);
-            if (fragsplit.length == 1)
-            {
-                parsedFrag[PARENT_INDEX] = "";
-                parsedFrag[VALUE_INDEX] = fragsplit[0].trim();
-            }
-            else
-            {
-                parsedFrag[PARENT_INDEX] = fragsplit[0].trim();
-                parsedFrag[VALUE_INDEX] = fragsplit[1].trim();
-            }
-        }
-        else
-        {
-            parsedFrag[PARENT_INDEX] = "";
-            parsedFrag[VALUE_INDEX] = fragment;
-        }
-
-        return parsedFrag;
-    }
-
-    public void setPostfix(String postfix)
-    {
-        this.postfix = parseExpressionFragment(postfix);
-
-        if ((this.postfix[1].contains("${") || this.postfix[1].equals("?")))
-            isParametrized = true;
-        else
-            isParametrized = false;
-    }
-
-    public boolean isParametrized(String param)
-    {
-        return isParametrized;
-    }
-
-    public boolean isParametrized()
-    {
-        return isParametrized;
-    }
-
-    @Override
-    public String toString()
-    {
-        if (type == LOGICAL_EXPRESSION_TYPE)
-            return prefix[VALUE_INDEX] + " " + operator.toString() + " " + postfix[VALUE_INDEX];
-        else if (type == LOGICAL_OPERATOR_TYPE)
-            return " " + operator.toString() + " ";
-        else
-            return "";
-    }
-
-    public String fullToString()
-    {
-        if (type == LOGICAL_EXPRESSION_TYPE)
-            return getFullPrefix() + " " + operator.toString() + " " + getFullPostfix();
-        else
-            return this.toString();
-    }
-
-    public String toStringTranslateSource(HashMap<String, String> map)
-    {
-        if (type == LOGICAL_EXPRESSION_TYPE)
-        {
-            StringBuffer tmpsb = new StringBuffer();
-            String prefixtranslate = map.get(prefix[PARENT_INDEX]);
-            String postfixtranslate = map.get(postfix[PARENT_INDEX]);
-
-            if (prefixtranslate != null)
-                tmpsb.append(prefixtranslate);
-            else
-                tmpsb.append(prefix[PARENT_INDEX]);
-            tmpsb.append(".").append(prefix[VALUE_INDEX]).append(" ").append(operator.toString()).append(" ");
-            if (postfixtranslate != null)
-                tmpsb.append(postfixtranslate);
-            else
-                tmpsb.append(postfix[PARENT_INDEX]);
-            tmpsb.append(".").append(postfix[VALUE_INDEX]);
-
-            return tmpsb.toString();
-        }
-        else
-            return this.toString();
-    }
-
-    public void setPrefix(String[] prefix)
-    {
-        this.prefix = prefix;
-    }
-
-    public void setPostfix(String[] postfix)
-    {
-        this.postfix = postfix;
-
-        if ((this.postfix[1].contains("${") || this.postfix[1].equals("?")))
-            isParametrized = true;
-        else
-            isParametrized = false;
-    }
-}

+ 0 - 251
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLJoinClause.java

@@ -1,251 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.sql.SQLException;
-
-public class SQLJoinClause
-{
-
-    public enum JoinType
-    {
-        INNER_JOIN, OUTER_JOIN;
-
-        public String toSQLString()
-        {
-            switch (this)
-            {
-                case INNER_JOIN:
-                    return "INNER JOIN";
-                case OUTER_JOIN:
-                    return "OUTER JOIN";
-                default:
-                    return "";
-            }
-        }
-
-        public String toECLString()
-        {
-            switch (this)
-            {
-                case OUTER_JOIN:
-                    return "FULL OUTER";
-                case INNER_JOIN:
-                    return "INNER";
-                default:
-                    return "";
-            }
-        }
-    }
-
-    private static final JoinType defaultType = JoinType.INNER_JOIN;
-
-    private JoinType              type;
-    private SQLWhereClause        OnClause;
-    private SQLTable              joinTable   = null;
-    private SQLTable              sourceTable = null;
-
-    public SQLJoinClause()
-    {
-        this.type = defaultType;
-        this.OnClause = new SQLWhereClause();
-    }
-
-    public SQLJoinClause(JoinType type)
-    {
-        this.type = type;
-        this.OnClause = new SQLWhereClause();
-    }
-
-    public boolean parseClause(String joinOnClause) throws SQLException
-    {
-        boolean success = false;
-
-        if (joinOnClause.length() > 0)
-        {
-            String joinSplit[] = joinOnClause.split("\\s+(?i)join\\s+");
-            if (joinSplit.length > 1)
-            {
-                if (joinSplit[0].trim().length() == 0)
-                {
-                    type = defaultType;
-                }
-                else if (joinSplit[0].trim().equalsIgnoreCase("INNER"))
-                {
-                    type = JoinType.INNER_JOIN;
-                }
-                else if (joinSplit[0].trim().equalsIgnoreCase("OUTER"))
-                {
-                    type = JoinType.OUTER_JOIN;
-                }
-                else
-                    throw new SQLException("Error: Invalid join clause found: " + joinOnClause);
-            }
-            else
-                throw new SQLException("Error: No valid join clause found: " + joinOnClause);
-
-            String clausesplit[] = joinSplit[1].split("\\s+(?i)on\\s+", 2);
-
-            if (clausesplit.length > 1)
-            {
-                String splittablefromalias[] = clausesplit[0].trim().split("\\s+(?i)as(\\s+|$)");
-                if (splittablefromalias.length == 1)
-                {
-                    String splittablebyblank[] = splittablefromalias[0].trim().split("\\s+");
-                    joinTable = new SQLTable(splittablebyblank[0]);
-                    if (splittablebyblank.length == 2)
-                        joinTable.setAlias(splittablebyblank[1].trim());
-                    else if (splittablebyblank.length > 2)
-                        throw new SQLException("Error: " + splittablefromalias[0]);
-                }
-                else if (splittablefromalias.length == 2)
-                {
-                    joinTable = new SQLTable(splittablefromalias[0].trim());
-                    joinTable.setAlias(splittablefromalias[1].trim());
-                }
-                else
-                    throw new SQLException("Error: Invalid SQL: " + clausesplit[0]);
-
-                String splitedands[] = clausesplit[1].split(" and | AND |,");
-
-                for (int i = 0; i < splitedands.length; i++)
-                {
-                    String splitedandors[] = splitedands[i].split(" or | OR ");
-
-                    SQLExpressionFragment andoperator = new SQLExpressionFragment("AND");
-
-                    for (int y = 0; y < splitedandors.length; y++)
-                    {
-                        SQLExpressionFragment exp = new SQLExpressionFragment(
-                                SQLExpressionFragment.LOGICAL_EXPRESSION_TYPE);
-                        SQLExpressionFragment orperator = new SQLExpressionFragment("OR");
-
-                        String trimmedExpression = splitedandors[y].trim();
-                        String operator = null;
-
-                        // order matters here!
-                        if (trimmedExpression.indexOf(SQLOperator.gte) != -1)
-                            operator = SQLOperator.gte;
-                        else if (trimmedExpression.indexOf(SQLOperator.lte) != -1)
-                            operator = SQLOperator.lte;
-                        else if (trimmedExpression.indexOf(SQLOperator.neq) != -1)
-                            operator = SQLOperator.neq;
-                        else if (trimmedExpression.indexOf(SQLOperator.eq) != -1)
-                            operator = SQLOperator.eq;
-                        else if (trimmedExpression.indexOf(SQLOperator.gt) != -1)
-                            operator = SQLOperator.gt;
-                        else if (trimmedExpression.indexOf(SQLOperator.lt) != -1)
-                            operator = SQLOperator.lt;
-                        else
-                            throw new SQLException("Invalid logical operator found: " + trimmedExpression);
-
-                        String splitedsqlexp[] = splitedandors[y].trim().split(operator);
-
-                        if (splitedsqlexp.length <= 0) // something went wrong, only the operator was found?
-                            throw new SQLException("Invalid SQL \"Where\" clause found around: " + splitedandors[y]);
-
-                        exp.setPrefix(parseExpressionFragment(splitedsqlexp[0].trim()));
-
-                        exp.setOperator(operator);
-                        if (!exp.isOperatorValid())
-                            throw new SQLException("Error: Invalid operator found: " + trimmedExpression);
-
-                        if (splitedsqlexp.length > 1)
-                        {
-                            exp.setPostfix(parseExpressionFragment(splitedsqlexp[1].trim()));
-                        }
-
-                        OnClause.addExpression(exp);
-
-                        if (y < splitedandors.length - 1)
-                            OnClause.addExpression(orperator);
-                    }
-
-                    if (i < splitedands.length - 1)
-                        OnClause.addExpression(andoperator);
-                }
-            }
-            else
-                throw new SQLException("Error: 'Join' clause does not contain 'On' clause.");
-        }
-
-        return success;
-    }
-
-    private String[] parseExpressionFragment(String fragment)
-    {
-        String[] parsedFrag = new String[2];
-
-        String fragsplit[] = fragment.split("\\.", 2);
-        if (fragsplit.length == 1)
-        {
-            parsedFrag[0] = "";
-            parsedFrag[1] = fragsplit[0].trim();
-        }
-        else
-        {
-            parsedFrag[0] = searchForPossibleTableName(fragsplit[0].trim());
-            parsedFrag[1] = fragsplit[1].trim();
-        }
-
-        return parsedFrag;
-    }
-
-    /*
-     * Returns table name if the tablename or alias match Otherwise return empty string
-     */
-    private String searchForPossibleTableName(String searchname)
-    {
-        if (searchname.equals(joinTable.getAlias()) || searchname.equals(joinTable.getName()))
-            return joinTable.getName();
-        else if (sourceTable != null
-                && (searchname.equals(sourceTable.getName()) || searchname.equals(sourceTable.getAlias())))
-            return sourceTable.getName();
-        else
-            return "";
-    }
-
-    public SQLWhereClause getOnClause()
-    {
-        return this.OnClause;
-    }
-
-    public JoinType getType()
-    {
-        return this.type;
-    }
-
-    public String getSQLTypeStr()
-    {
-        return type.toSQLString();
-    }
-
-    public String getECLTypeStr()
-    {
-        return type.toECLString();
-    }
-
-    public String getJoinTableName()
-    {
-        return joinTable.getName();
-    }
-
-    public String getJoinTableAlias()
-    {
-        return joinTable.getAlias();
-    }
-
-    public SQLTable getSourceTable()
-    {
-        return sourceTable;
-    }
-
-    public void setSourceTable(SQLTable sourceTable)
-    {
-        this.sourceTable = sourceTable;
-    }
-
-    @Override
-    public String toString()
-    {
-        return getSQLTypeStr() + " " + getJoinTableName() + " ON " + OnClause.fullToString();
-    }
-}

+ 0 - 116
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLOperator.java

@@ -1,116 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class SQLOperator
-{
-    private static List<String> validOps;
-
-    // When adding a new opereator, make sure to add it to validOps array
-    public static final String  eq        = new String("=");
-    public static final String  neq       = new String("<>");
-    public static final String  neq2      = new String("!=");
-    public static final String  isNull    = new String("IS NULL");
-    public static final String  isNotNull = new String("IS NOT NULL");
-    public static final String  gt        = new String(">");
-    public static final String  lt        = new String("<");
-    public static final String  gte       = new String(">=");
-    public static final String  lte       = new String("<=");
-    public static final String  and       = new String("AND");
-    public static final String  or        = new String("OR");
-    public static final String  not       = new String("NOT");
-    public static final String  exists    = new String("EXISTS");
-    public static final String  like      = new String("LIKE");
-    public static final String  in        = new String("IN");
-
-    static
-    {
-        validOps = new ArrayList<String>();
-        validOps.add(eq);
-        validOps.add(neq);
-        validOps.add(neq2);
-        validOps.add(isNull);
-        validOps.add(isNotNull);
-        validOps.add(gt);
-        validOps.add(lt);
-        validOps.add(gte);
-        validOps.add(lte);
-        validOps.add(and);
-        validOps.add(or);
-        validOps.add(not);
-        validOps.add(exists);
-        validOps.add(like);
-        validOps.add(in);
-    }
-
-    private final String        value;
-
-    private static void populateValidOps()
-    {
-        validOps = new ArrayList<String>();
-
-        validOps.add(eq);
-        validOps.add(neq);
-        validOps.add(isNull);
-        validOps.add(isNotNull);
-        validOps.add(gt);
-        validOps.add(lt);
-        validOps.add(gte);
-        validOps.add(lte);
-        validOps.add(and);
-        validOps.add(or);
-        validOps.add(not);
-        validOps.add(exists);
-        validOps.add(like);
-        validOps.add(in);
-    }
-
-    public SQLOperator(String operator)
-    {
-        if (validOps == null)
-            populateValidOps();
-
-        if (validOps.contains(operator.toUpperCase()))
-            value = operator.toUpperCase();
-        else
-            value = null;
-    }
-
-    static public String parseOperatorFromFragmentStr(String fragment)
-    {
-        String trimmedFragment = fragment.trim();
-        String operator = null;
-
-        if (trimmedFragment.indexOf(SQLOperator.gte) != -1)
-            operator = SQLOperator.gte;
-        else if (trimmedFragment.indexOf(SQLOperator.lte) != -1)
-            operator = SQLOperator.lte;
-        else if (trimmedFragment.indexOf(SQLOperator.neq) != -1)
-            operator = SQLOperator.neq;
-        else if (trimmedFragment.indexOf(SQLOperator.eq) != -1)
-            operator = SQLOperator.eq;
-        else if (trimmedFragment.indexOf(SQLOperator.gt) != -1)
-            operator = SQLOperator.gt;
-        else if (trimmedFragment.indexOf(SQLOperator.lt) != -1)
-            operator = SQLOperator.lt;
-
-        return operator;
-    }
-
-    public String getValue()
-    {
-        return value;
-    }
-
-    public boolean isValid()
-    {
-        return validOps.contains(value);
-    }
-
-    @Override
-    public String toString()
-    {
-        return value == null ? "" : value;
-    }
-}

+ 0 - 844
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLParser.java

@@ -1,844 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.sql.SQLException;
-import java.util.*;
-import java.util.Map.Entry;
-
-public class SQLParser
-{
-    public final static short        SQL_TYPE_UNKNOWN     = -1;
-    public final static short        SQL_TYPE_SELECT      = 1;
-    public final static short        SQL_TYPE_SELECTCONST = 2;
-    public final static short        SQL_TYPE_CALL        = 3;
-
-    private SQLTable                 queryTable;
-    private int                      sqlType;
-    private List<HPCCColumnMetaData> selectColumns;
-    private SQLWhereClause           whereClause;
-    private SQLJoinClause            joinClause;
-    private String[]                 columnGroupByNames;
-    private String[]                 columnOrderByNames;
-    private String[]                 procInParamValues;
-    private String                   storedProcName;
-    private int                      limit;
-    private boolean                  columnsVerified;
-    private String                   indexHint;
-
-    public void process(String insql) throws SQLException
-    {
-        System.out.println("INCOMING SQL: " + insql);
-        columnsVerified = false;
-        limit = -1;
-        queryTable = null;
-        selectColumns = new ArrayList<HPCCColumnMetaData>();
-        whereClause = new SQLWhereClause();
-        joinClause = null;
-        procInParamValues = new String[0];
-        storedProcName = null;
-        sqlType = SQL_TYPE_UNKNOWN;
-        indexHint = null;
-
-        insql = HPCCJDBCUtils.removeAllNewLines(insql);
-        String insqlupcase = insql.toUpperCase();
-
-        if (insql.matches("^(?i)alter\\s+(.*?)"))
-        {
-            throw new SQLException("ALTER TABLE statements are not supported.");
-        }
-        else if (insql.matches("^(?i)drop\\s+(.*?)"))
-        {
-            throw new SQLException("DROP statements are not supported.");
-        }
-        else if (insql.matches("^(?i)insert\\s+(.*?)"))
-        {
-            throw new SQLException("INSERT statements are not supported.");
-        }
-        else if (insql.matches("^(?i)update\\s+(.*?)"))
-        {
-            throw new SQLException("UPDATE statements are not supported.");
-        }
-        else if (insql.matches("^(?i)call\\s+(.*?)"))
-        {
-            sqlType = SQL_TYPE_CALL;
-            int callstrpos = insqlupcase.lastIndexOf("CALL ");
-            int storedprocstrpos = insql.lastIndexOf("(");
-            int paramlistend = insql.lastIndexOf(")");
-            String paramToken = "";
-
-            if (storedprocstrpos == -1)
-                storedProcName = insql.substring(callstrpos + 5);
-            else
-            {
-                if (paramlistend == -1)
-                    throw new SQLException("Missing closing param in: " + insql);
-                storedProcName = insql.substring(callstrpos + 5, storedprocstrpos);
-                paramToken = insql.substring(storedprocstrpos + 1, paramlistend);
-            }
-
-            if (paramToken.length() > 0)
-            {
-                StringTokenizer tokenizer = new StringTokenizer(paramToken, ",");
-                procInParamValues = new String[tokenizer.countTokens()];
-                int i = 0;
-                while (tokenizer.hasMoreTokens())
-                {
-                    procInParamValues[i++] = tokenizer.nextToken().trim();
-                }
-            }
-        }
-        else if (insql.matches("^(?i)select\\s+(.*?)"))
-        {
-            if (insql.matches("^(?i)select(.*?)\\s+(?i)union\\s+.*"))
-                throw new SQLException("SELECT UNIONS are not supported.");
-
-            sqlType = SQL_TYPE_SELECT;
-            int fromstrpos = insqlupcase.lastIndexOf(" FROM ");
-
-            if (fromstrpos == -1)
-            {
-                if (parseConstantSelect(insql))
-                {
-                    System.out.println("Found Select <constant>");
-                    sqlType = SQL_TYPE_SELECTCONST;
-                    return;
-                }
-                else
-                    throw new SQLException("Malformed SQL. Missing FROM statement.");
-            }
-
-            int useindexstrpos = insqlupcase.lastIndexOf(" USE INDEX(");
-            int joinPos = insqlupcase.lastIndexOf(" JOIN ");
-            int wherePos = insqlupcase.lastIndexOf(" WHERE ");
-            int groupPos = insqlupcase.lastIndexOf(" GROUP BY ");
-            int orderPos = insqlupcase.lastIndexOf(" ORDER BY ");
-            int limitPos = insqlupcase.lastIndexOf(" LIMIT ");
-
-            if (useindexstrpos != -1 && useindexstrpos < fromstrpos)
-                throw new SQLException("Malformed SQL: USE clause placement.");
-
-            if (joinPos != -1 && joinPos < fromstrpos)
-                throw new SQLException("Malformed SQL: Join clause placement.");
-
-            if (wherePos != -1 && wherePos < fromstrpos)
-                throw new SQLException("Malformed SQL: WHERE clause placement.");
-
-            try
-            {
-                if (limitPos != -1)
-                {
-                    limit = Integer.valueOf(insqlupcase.substring(limitPos + 6).trim());
-                    insqlupcase = insqlupcase.substring(0, limitPos);
-                }
-            }
-            catch (NumberFormatException ne)
-            {
-                throw new SQLException("Error near :\'" + insqlupcase.substring(limitPos) + "\'");
-            }
-
-            String orderByToken = "";
-            String groupByToken = "";
-
-            if (groupPos != -1 && (orderPos == -1 || groupPos < orderPos))
-            {
-                if (orderPos == -1)
-                {
-                    groupByToken = insqlupcase.substring(groupPos + 10);
-                }
-                else
-                {
-                    groupByToken = insqlupcase.substring(groupPos + 10, orderPos);
-                    orderByToken = insqlupcase.substring(orderPos + 10);
-                }
-
-                insqlupcase = insqlupcase.substring(0, groupPos);
-
-            }
-            else if (orderPos != -1 && (groupPos == -1 || orderPos < groupPos))
-            {
-                if (groupPos == -1)
-                {
-                    orderByToken = insqlupcase.substring(orderPos + 10);
-                }
-                else
-                {
-                    orderByToken = insqlupcase.substring(orderPos + 10, groupPos);
-                    groupByToken = insqlupcase.substring(groupPos + 10);
-                }
-                insqlupcase = insqlupcase.substring(0, orderPos);
-            }
-
-            if (orderByToken.length() > 0)
-            {
-                StringTokenizer tokenizer = new StringTokenizer(orderByToken, ",");
-
-                columnOrderByNames = new String[tokenizer.countTokens()];
-                int i = 0;
-                while (tokenizer.hasMoreTokens())
-                {
-                    String orderbycolumn = tokenizer.nextToken().trim();
-                    boolean orderbyascending = true;
-
-                    int dirPos = orderbycolumn.lastIndexOf("ASC");
-                    if (dirPos == -1)
-                        dirPos = orderbycolumn.lastIndexOf("DESC");
-
-                    // not else if from above if!!
-                    if (dirPos != -1)
-                    {
-                        orderbyascending = orderbycolumn.contains("ASC");
-                        orderbycolumn = orderbycolumn.substring(0, dirPos).trim();
-                    }
-                    columnOrderByNames[i++] = (orderbyascending == true ? "" : "-") + orderbycolumn;
-                }
-            }
-
-            if (groupByToken.length() > 0)
-            {
-                StringTokenizer tokenizer = new StringTokenizer(groupByToken, ",");
-                columnGroupByNames = new String[tokenizer.countTokens()];
-                int i = 0;
-                while (tokenizer.hasMoreTokens())
-                {
-                    columnGroupByNames[i++] = tokenizer.nextToken().trim();
-                }
-            }
-
-            insql = insql.substring(0, insqlupcase.length());
-            String fullTableName = null;
-
-            if (joinPos != -1)
-            {
-                fullTableName = insql.substring(fromstrpos + 6, joinPos).split("\\s+(?i)inner|(?i)outer\\s*")[0];
-            }
-            else if (useindexstrpos != -1)
-            {
-                fullTableName = insql.substring(fromstrpos + 6, useindexstrpos);
-            }
-            else if (wherePos != -1)
-            {
-                fullTableName = insql.substring(fromstrpos + 6, wherePos);
-            }
-            else
-            {
-                fullTableName = insql.substring(fromstrpos + 6);
-            }
-
-            String splittablefromalias[] = fullTableName.trim().split("\\s+(?i)as(\\s+|$)");
-            if (splittablefromalias.length == 1)
-            {
-                String splittablebyblank[] = splittablefromalias[0].trim().split("\\s+");
-                queryTable = new SQLTable(splittablebyblank[0].trim());
-                if (splittablebyblank.length == 2)
-                    queryTable.setAlias(splittablebyblank[1].trim());
-                else if (splittablebyblank.length > 2)
-                    throw new SQLException("Invalid SQL: " + splittablefromalias[0]);
-            }
-            else if (splittablefromalias.length == 2)
-            {
-                queryTable = new SQLTable(splittablefromalias[0].trim());
-                queryTable.setAlias(splittablefromalias[1].trim());
-            }
-            else
-                throw new SQLException("Invalid SQL: " + fullTableName);
-
-            if (fromstrpos <= 7)
-                throw new SQLException("Invalid SQL: Missing select column(s).");
-
-            StringTokenizer comatokens = new StringTokenizer(insql.substring(7, fromstrpos), ",");
-
-            for (int sqlcolpos = 1; comatokens.hasMoreTokens();)
-            {
-                HPCCColumnMetaData colmetadata = null;
-                String colassplit[] = comatokens.nextToken().split("\\s+(?i)as\\s+");
-                String col = colassplit[0].trim();
-
-                if (col.contains("("))
-                {
-                    int funcparampos = 1;
-                    List<HPCCColumnMetaData> funccols = new ArrayList<HPCCColumnMetaData>();
-
-                    String funcname = col.substring(0, col.indexOf('('));
-                    ECLFunction func = ECLFunctions.getEclFunction(funcname.toUpperCase());
-
-                    if (func == null)
-                        throw new SQLException("ECL Function " + funcname + "is not currently supported");
-
-                    col = col.substring(col.indexOf('(') + 1).trim();
-
-                    if (col.contains(")"))
-                    {
-                        col = col.substring(0, col.indexOf(")")).trim();
-                        if (col.length() > 0)
-                        {
-                            funccols.add(new HPCCColumnMetaData(col, funcparampos++, java.sql.Types.OTHER));
-                        }
-                    }
-                    else
-                    {
-                        funccols.add(new HPCCColumnMetaData(col, funcparampos++, java.sql.Types.OTHER));
-                        while (comatokens.hasMoreTokens())
-                        {
-                            col = comatokens.nextToken().trim();
-                            if (col.contains(")"))
-                            {
-                                col = col.substring(0, col.indexOf(")"));
-                                funccols.add(new HPCCColumnMetaData(col, funcparampos++, java.sql.Types.OTHER));
-                                break;
-                            }
-                            funccols.add(new HPCCColumnMetaData(col, funcparampos++, java.sql.Types.OTHER));
-                        }
-                    }
-
-                    if (ECLFunctions.verifyEclFunction(funcname, funccols))
-                        colmetadata = new HPCCColumnMetaData(funcname, sqlcolpos++, funccols);
-                    else
-                        throw new SQLException("Function " + funcname + " does not map to ECL as written");
-
-                    colmetadata.setSqlType(func.getReturnType().getSqlType());
-                }
-
-                if (colmetadata == null)
-                    colmetadata = new HPCCColumnMetaData(col, sqlcolpos++, java.sql.Types.OTHER);
-
-                colmetadata.setTableName(queryTable.getName());
-
-                if (colassplit.length > 1)
-                    colmetadata.setAlias(colassplit[1]);
-
-                selectColumns.add(colmetadata);
-            }
-
-            if (useindexstrpos != -1)
-            {
-                String useindexstr = insql.substring(useindexstrpos + 11);
-                int useindexend = useindexstr.indexOf(")");
-                if (useindexend < 0)
-                    throw new SQLException("Malformed USE INDEX() clause.");
-                indexHint = useindexstr.substring(0, useindexend).trim();
-                System.out.println(indexHint);
-            }
-
-            if (wherePos != -1)
-            {
-                String strWhere = insql.substring(wherePos + 7);
-                String splitedwhereands[] = strWhere.split(" and | AND |,");
-
-                for (int i = 0; i < splitedwhereands.length; i++)
-                {
-                    String splitedwhereandors[] = splitedwhereands[i].split(" or | OR ");
-
-                    SQLExpressionFragment andoperator = new SQLExpressionFragment("AND");
-
-                    for (int y = 0; y < splitedwhereandors.length; y++)
-                    {
-                        SQLExpressionFragment exp = new SQLExpressionFragment(
-                                SQLExpressionFragment.LOGICAL_EXPRESSION_TYPE);
-                        SQLExpressionFragment orperator = new SQLExpressionFragment("OR");
-
-                        String trimmedExpression = splitedwhereandors[y].trim();
-                        String operator = null;
-
-                        // order matters here!
-                        if (trimmedExpression.indexOf(SQLOperator.gte) != -1)
-                            operator = SQLOperator.gte;
-                        else if (trimmedExpression.indexOf(SQLOperator.lte) != -1)
-                            operator = SQLOperator.lte;
-                        else if (trimmedExpression.indexOf(SQLOperator.neq) != -1)
-                            operator = SQLOperator.neq;
-                        else if (trimmedExpression.indexOf(SQLOperator.neq2) != -1)
-                            operator = SQLOperator.neq2;
-                        else if (trimmedExpression.indexOf(SQLOperator.eq) != -1)
-                            operator = SQLOperator.eq;
-                        else if (trimmedExpression.indexOf(SQLOperator.gt) != -1)
-                            operator = SQLOperator.gt;
-                        else if (trimmedExpression.indexOf(SQLOperator.lt) != -1)
-                            operator = SQLOperator.lt;
-                        else
-                            throw new SQLException("Invalid logical operator found: " + trimmedExpression);
-
-                        String splitedsqlexp[] = splitedwhereandors[y].trim().split(operator);
-
-                        if (splitedsqlexp.length <= 1) // something went wrong, only the operator was found?
-                            throw new SQLException("Invalid SQL Where clause found around: " + splitedwhereandors[y]);
-
-                        exp.setPrefix(splitedsqlexp[0]);
-                        if (exp.getPrefixParent().length() > 0
-                                && (!exp.getPrefixParent().equals(queryTable.getName()) && !exp.getPrefixParent()
-                                        .equals(queryTable.getAlias())))
-                            throw new SQLException("Invalid field found: " + splitedsqlexp[0]);
-
-                        exp.setOperator(operator);
-                        if (!exp.isOperatorValid())
-                            throw new SQLException("Error: Invalid operator found: ");
-
-                        if (splitedsqlexp.length > 1)
-                            exp.setPostfix(splitedsqlexp[1].trim());
-
-                        if (exp.getPostfixParent().length() > 0
-                                && (!exp.getPrefixParent().equals(queryTable.getName()) && !exp.getPrefixParent()
-                                        .equals(queryTable.getAlias())))
-                            throw new SQLException("Invalid field found: " + splitedsqlexp[1]);
-
-                        whereClause.addExpression(exp);
-
-                        if (y < splitedwhereandors.length - 1)
-                            whereClause.addExpression(orperator);
-                    }
-
-                    if (i < splitedwhereands.length - 1)
-                        whereClause.addExpression(andoperator);
-                }
-
-                insqlupcase = insqlupcase.substring(0, wherePos);
-            }
-
-            if (joinPos != -1)
-            {
-                joinClause = new SQLJoinClause();
-                joinClause.setSourceTable(queryTable);
-
-                int inJoinPos = insqlupcase.lastIndexOf(" INNER JOIN ");
-
-                if (inJoinPos != -1)
-                {
-                    joinClause.parseClause(insql.substring(inJoinPos, insqlupcase.length()));
-                }
-                else
-                {
-                    int outJoinPos = insqlupcase.lastIndexOf(" OUTER JOIN ");
-
-                    if (outJoinPos != -1)
-                    {
-                        joinClause.parseClause(insql.substring(outJoinPos, insqlupcase.length()));
-                    }
-                    else
-                    {
-                        joinClause.parseClause(insql.substring(joinPos, insqlupcase.length()));
-                    }
-                }
-                System.out.println(joinClause.toString());
-            }
-        }
-        else
-            throw new SQLException("Invalid SQL found - only supports CALL and/or SELECT statements.");
-    }
-
-    private boolean parseConstantSelect(String sql) throws SQLException
-    {
-        String sqlUpper = sql.toUpperCase();
-        int wherePos = sqlUpper.lastIndexOf(" WHERE ");
-        int groupPos = sqlUpper.lastIndexOf(" GROUP BY ");
-        int orderPos = sqlUpper.lastIndexOf(" ORDER BY ");
-        int limitPos = sqlUpper.lastIndexOf(" LIMIT ");
-
-        if (wherePos > 0 || groupPos > 0 || orderPos > 0)
-            return false;
-        try
-        {
-            if (limitPos > 0)
-            {
-                limit = Integer.valueOf(sqlUpper.substring(limitPos + 6).trim());
-                sql = sqlUpper.substring(0, limitPos);
-            }
-        }
-        catch (NumberFormatException ne)
-        {
-            throw new SQLException("Error near :\'" + sql.substring(limitPos) + "\'");
-        }
-
-        // At this point we have select <something>
-        StringTokenizer comatokens = new StringTokenizer(sql.substring(6), ",");
-
-        for (int pos = 1; comatokens.hasMoreTokens();)
-        {
-            String colassplit[] = comatokens.nextToken().split("\\s+(?i)as\\s+");
-            String col = colassplit[0].trim();
-
-            HPCCColumnMetaData colmetadata = null;
-
-            if (HPCCJDBCUtils.isLiteralString(col))
-            {
-                colmetadata = new HPCCColumnMetaData("ConstStr" + pos, pos++, java.sql.Types.VARCHAR);
-                colmetadata.setEclType("STRING");
-            }
-            else if (HPCCJDBCUtils.isNumeric(col))
-            {
-                colmetadata = new HPCCColumnMetaData("ConstNum" + pos, pos++, java.sql.Types.NUMERIC);
-                colmetadata.setEclType("INTEGER");
-            }
-
-            colmetadata.setColumnType(HPCCColumnMetaData.COLUMN_TYPE_CONSTANT);
-            colmetadata.setConstantValue(col);
-
-            if (colassplit.length > 1)
-                colmetadata.setAlias(colassplit[1]);
-
-            selectColumns.add(colmetadata);
-        }
-
-        return true;
-    }
-
-    public boolean columnsHasWildcard()
-    {
-        Iterator<HPCCColumnMetaData> it = selectColumns.iterator();
-        while (it.hasNext())
-        {
-            if (it.next().getColumnName().contains("*"))
-                return true;
-        }
-        return false;
-    }
-
-    public int orderByCount()
-    {
-        return columnOrderByNames == null ? 0 : columnOrderByNames.length;
-    }
-
-    public boolean hasOrderByColumns()
-    {
-        return columnOrderByNames != null && columnOrderByNames.length > 0 ? true : false;
-    }
-
-    public int groupByCount()
-    {
-        return columnGroupByNames == null ? 0 : columnGroupByNames.length;
-    }
-
-    public String getOrderByColumn(int index)
-    {
-
-        return (columnOrderByNames == null || index < 0 || index >= columnOrderByNames.length) ? ""
-                : columnOrderByNames[index];
-    }
-
-    public String getOrderByString()
-    {
-        StringBuilder tmp = new StringBuilder("");
-        for (int i = 0; i < columnOrderByNames.length; i++)
-        {
-            tmp.append(columnOrderByNames[i]);
-            if (i != columnOrderByNames.length - 1)
-                tmp.append(',');
-        }
-        return tmp.toString();
-    }
-
-    public String getOrderByString(char delimiter)
-    {
-        StringBuilder tmp = new StringBuilder("");
-        for (int i = 0; i < columnOrderByNames.length; i++)
-        {
-            tmp.append(columnOrderByNames[i]);
-            if (i != columnOrderByNames.length - 1)
-                tmp.append(delimiter);
-        }
-        return tmp.toString();
-    }
-
-    public String getGroupByString()
-    {
-        StringBuilder tmp = new StringBuilder("");
-        for (int i = 0; i < columnGroupByNames.length; i++)
-        {
-            tmp.append(columnGroupByNames[i]);
-            if (i != columnGroupByNames.length - 1)
-                tmp.append(',');
-        }
-        return tmp.toString();
-    }
-
-    public String getGroupByString(char delimiter)
-    {
-        StringBuilder tmp = new StringBuilder("");
-        for (int i = 0; i < columnGroupByNames.length; i++)
-        {
-            tmp.append(columnGroupByNames[i]);
-            if (i != columnGroupByNames.length - 1)
-                tmp.append(delimiter);
-        }
-        return tmp.toString();
-    }
-
-    public String getGroupByColumn(int index)
-    {
-
-        return (columnGroupByNames == null || index < 0 || index >= columnGroupByNames.length) ? ""
-                : columnGroupByNames[index];
-    }
-
-    public boolean hasGroupByColumns()
-    {
-        return columnGroupByNames != null && columnGroupByNames.length > 0 ? true : false;
-    }
-
-    public boolean hasLimitBy()
-    {
-        return limit == -1 ? false : true;
-    }
-
-    public String[] getStoredProcInParamVals()
-    {
-        return procInParamValues;
-    }
-
-    public String getStoredProcName()
-    {
-        return storedProcName;
-    }
-
-    public String getTableAlias()
-    {
-        return queryTable.getAlias();
-    }
-
-    public int getSqlType()
-    {
-        return sqlType;
-    }
-
-    public int getLimit()
-    {
-        return limit;
-    }
-
-    public String getTableName()
-    {
-        return queryTable.getName();
-    }
-
-    public String[] getColumnNames()
-    {
-        Iterator<HPCCColumnMetaData> it = selectColumns.iterator();
-        String[] selcols = new String[selectColumns.size()];
-        for (int i = 0; it.hasNext(); i++)
-            selcols[i] = it.next().getColumnName();
-
-        return selcols;
-    }
-
-    public void populateParametrizedExpressions(Map inParameters) throws SQLException
-    {
-        if (inParameters.size() > 0)
-        {
-            if (whereClause != null && whereClause.getExpressionsCount() > 0)
-            {
-                Iterator<SQLExpressionFragment> expressionit = whereClause.getExpressions();
-                int paramIndex = 0;
-                while (expressionit.hasNext())
-                {
-                    SQLExpressionFragment exp = expressionit.next();
-                    if (exp.isParametrized())
-                    {
-                        String value = (String) inParameters.get(new Integer(++paramIndex));
-                        if (value == null)
-                            throw new SQLException("Could not bound parametrized expression(" + exp + ") to parameter");
-                        exp.setPostfix(value);
-                    }
-                }
-            }
-            else if (procInParamValues.length > 0)
-            {
-                int paramindex = 0;
-                for (int columindex = 0; columindex < procInParamValues.length; columindex++)
-                {
-                    if (isParametrized(procInParamValues[columindex]))
-                    {
-                        String value = (String) inParameters.get(new Integer(++paramindex));
-                        if (value == null)
-                            throw new SQLException("Could not bound parameter");
-                        procInParamValues[columindex] = value;
-                    }
-                }
-            }
-        }
-    }
-
-    boolean isParametrized(String param)
-    {
-        return (param.contains("${") || param.equals("?"));
-    }
-
-    public int getWhereClauseExpressionsCount()
-    {
-        return whereClause.getExpressionsCount();
-    }
-
-    public String[] getWhereClauseNames()
-    {
-        return whereClause.getExpressionNames();
-    }
-
-    public String[] getUniqueWhereClauseNames()
-    {
-        return whereClause.getUniqueExpressionNames();
-    }
-
-    public SQLExpressionFragment getExpressionFromName(String name)
-    {
-        return whereClause.getExpressionFromName(name);
-    }
-
-    public boolean whereClauseContainsKey(String name)
-    {
-        return whereClause.containsKey(name);
-    }
-
-    public String getWhereClauseString()
-    {
-        return whereClause.toString();
-    }
-
-    public int getUniqueWhereColumnCount()
-    {
-        return whereClause.getUniqueColumnCount();
-    }
-
-    public boolean whereClauseContainsOrOperator()
-    {
-        return whereClause.isOrOperatorUsed();
-    }
-
-    public List<HPCCColumnMetaData> getSelectColumns()
-    {
-        return selectColumns;
-    }
-
-    public void expandWildCardColumn(HashMap<String, HPCCColumnMetaData> allFields)
-    {
-        Iterator<HPCCColumnMetaData> it = selectColumns.iterator();
-
-        // for loop iterator b/c we need the index for each column.
-        for (int i = 0; it.hasNext(); i++)
-        {
-            if (it.next().getColumnName().equals("*"))
-            {
-                // fine for now, we do need to address at some point
-                System.out.println("Expanding wildcard, select columns order might be altered");
-                selectColumns.remove(i);
-
-                Iterator<Entry<String, HPCCColumnMetaData>> availablefields = allFields.entrySet().iterator();
-                while (availablefields.hasNext())
-                {
-                    HPCCColumnMetaData element = (HPCCColumnMetaData) availablefields.next().getValue();
-                    selectColumns.add(element);
-                }
-                break;
-            }
-        }
-    }
-
-    public boolean areColumnsVerified()
-    {
-        return columnsVerified;
-    }
-
-    public void verifyAndProcessALLSelectColumns(HashMap<String, HPCCColumnMetaData> availableCols) throws Exception
-    {
-        if (areColumnsVerified())
-            return;
-
-        for (int i = 0; i < selectColumns.size(); i++)
-        {
-            verifyAndProcessAllColumn(selectColumns.get(i), availableCols);
-        }
-
-        if (columnsHasWildcard())
-            expandWildCardColumn(availableCols);
-
-        columnsVerified = true;
-    }
-
-    public void verifyAndProcessAllColumn(HPCCColumnMetaData column, HashMap<String, HPCCColumnMetaData> availableCols)
-            throws Exception
-    {
-        String fieldName = column.getColumnName();
-        String tableName = queryTable.getName();
-
-        String colsplit[] = fieldName.split("\\.");
-
-        if (colsplit.length == 2)
-        {
-            tableName = searchForPossibleTableName(colsplit[0]);
-
-            if (tableName.equals(""))
-                throw new Exception("Invalid column found: " + fieldName);
-
-            fieldName = colsplit[1];
-        }
-        else if (colsplit.length > 2)
-            throw new Exception("Invalid column found: " + fieldName);
-
-        if (!availableCols.containsKey(tableName + "." + fieldName))
-        {
-            if (!fieldName.trim().equals("*"))
-            {
-                if (column.getColumnType() == HPCCColumnMetaData.COLUMN_TYPE_FNCTION)
-                {
-                    if (column.getAlias() == null)
-                        column.setAlias(fieldName + "Out");
-
-                    List<HPCCColumnMetaData> funccols = column.getFunccols();
-                    for (int y = 0; y < funccols.size(); y++)
-                    {
-                        verifyAndProcessAllColumn(funccols.get(y), availableCols);
-                    }
-                }
-                else if (HPCCJDBCUtils.isLiteralString(fieldName))
-                {
-                    column.setColumnName("ConstStr" + column.getIndex());
-                    column.setEclType("STRING");
-                    column.setSqlType(java.sql.Types.VARCHAR);
-                    column.setColumnType(HPCCColumnMetaData.COLUMN_TYPE_CONSTANT);
-                    column.setConstantValue(fieldName);
-                }
-                else if (HPCCJDBCUtils.isNumeric(fieldName))
-                {
-                    column.setColumnName("ConstNum" + column.getIndex());
-                    column.setEclType("INTEGER");
-                    column.setSqlType(java.sql.Types.NUMERIC);
-                    column.setColumnType(HPCCColumnMetaData.COLUMN_TYPE_CONSTANT);
-                    column.setConstantValue(fieldName);
-                }
-                else
-                    throw new Exception("Invalid column found: " + fieldName);
-            }
-        }
-        else
-        {
-            column.setTableName(tableName);
-            column.setColumnName(fieldName);
-            column.setEclType(availableCols.get(tableName + "." + fieldName).getEclType());
-        }
-    }
-
-    /*
-     * Returns table name if the tablename or alias match Otherwise return empty string
-     */
-    private String searchForPossibleTableName(String searchname)
-    {
-        if (searchname.equals(queryTable.getAlias()) || searchname.equals(queryTable.getName()))
-            return queryTable.getName();
-        else if (hasJoinClause()
-                && (searchname.equals(joinClause.getJoinTableName()) || searchname.equals(joinClause
-                        .getJoinTableAlias())))
-            return joinClause.getJoinTableName();
-        else
-            return "";
-    }
-
-    public String getIndexHint()
-    {
-        return indexHint;
-    }
-
-    public boolean hasJoinClause()
-    {
-        return joinClause != null;
-    }
-
-    public SQLJoinClause getJoinClause()
-    {
-        return joinClause;
-    }
-}

+ 0 - 48
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLTable.java

@@ -1,48 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-public class SQLTable
-{
-    private String name;
-    private String alias;
-
-    public SQLTable(String name)
-    {
-        this.name = name;
-        this.alias = name;
-    }
-
-    public SQLTable(String name, String alias)
-    {
-        this.name = name;
-        this.alias = alias;
-    }
-
-    public SQLTable(String name, String alias, DFUFile dfufile)
-    {
-        this.name = name;
-        this.alias = alias;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public String getAlias()
-    {
-        return alias;
-    }
-
-    public void setAlias(String alias)
-    {
-        this.alias = alias;
-    }
-
-    public String translateIfAlias(String possibleAlias)
-    {
-        if (possibleAlias.equals(alias) || possibleAlias.equals(name))
-            return name;
-        else
-            return null;
-    }
-}

+ 0 - 151
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/jdbcdriver/SQLWhereClause.java

@@ -1,151 +0,0 @@
-package com.hpccsystems.jdbcdriver;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-public class SQLWhereClause
-{
-    private List<SQLExpressionFragment> expressions;
-    private List<String>                expressionUniqueColumnNames;
-    private int                         expressionsCount;
-    private int                         operatorsCount;
-    private boolean                     orOperatorUsed;
-
-    public SQLWhereClause()
-    {
-        expressions = new ArrayList<SQLExpressionFragment>();
-        expressionUniqueColumnNames = new ArrayList<String>();
-        expressionsCount = 0;
-        operatorsCount = 0;
-        orOperatorUsed = false;
-    }
-
-    public void addExpression(SQLExpressionFragment expression)
-    {
-        expressions.add(expression);
-        if (expression.getType() == SQLExpressionFragment.LOGICAL_EXPRESSION_TYPE)
-        {
-            expressionsCount++;
-            if (!expressionUniqueColumnNames.contains(expression.getPrefixValue()))
-                expressionUniqueColumnNames.add(expression.getPrefixValue());
-        }
-        else
-        {
-            operatorsCount++;
-            if (expression.getOperator().getValue().equals(SQLOperator.or))
-                orOperatorUsed = true;
-        }
-    }
-
-    public Iterator<SQLExpressionFragment> getExpressions()
-    {
-        return expressions.iterator();
-    }
-
-    public int getExpressionsCount()
-    {
-        return expressionsCount;
-    }
-
-    public int getOperatorsCount()
-    {
-        return operatorsCount;
-    }
-
-    @Override
-    public String toString()
-    {
-        String clause = new String("");
-        Iterator<SQLExpressionFragment> it = expressions.iterator();
-        while (it.hasNext())
-        {
-            clause += ((SQLExpressionFragment) it.next()).toString();
-        }
-        return clause;
-    }
-
-    public String fullToString()
-    {
-        String clause = new String("");
-        Iterator<SQLExpressionFragment> it = expressions.iterator();
-        while (it.hasNext())
-        {
-            clause += ((SQLExpressionFragment) it.next()).fullToString();
-        }
-        return clause;
-    }
-
-    public String toStringTranslateSource(HashMap<String, String> map)
-    {
-        String clause = new String("");
-        Iterator<SQLExpressionFragment> it = expressions.iterator();
-        while (it.hasNext())
-        {
-            clause += ((SQLExpressionFragment) it.next()).toStringTranslateSource(map);
-        }
-        return clause;
-    }
-
-    public String[] getExpressionNames()
-    {
-        String[] names = new String[getExpressionsCount()];
-        Iterator<SQLExpressionFragment> it = expressions.iterator();
-        int i = 0;
-        while (it.hasNext())
-        {
-            SQLExpressionFragment exp = it.next();
-            if (exp.getType() == SQLExpressionFragment.LOGICAL_EXPRESSION_TYPE)
-            {
-                names[i++] = exp.getPrefixValue();
-            }
-        }
-        return names;
-    }
-
-    public SQLExpressionFragment getExpressionFromName(String name)
-    {
-        Iterator<SQLExpressionFragment> it = expressions.iterator();
-        while (it.hasNext())
-        {
-            SQLExpressionFragment exp = it.next();
-            if (exp.getType() == SQLExpressionFragment.LOGICAL_EXPRESSION_TYPE && exp.getPrefixValue().equals(name)) { return exp; }
-        }
-        return null;
-    }
-
-    public boolean containsKey(String name)
-    {
-        Iterator<SQLExpressionFragment> it = expressions.iterator();
-        while (it.hasNext())
-        {
-            SQLExpressionFragment exp = it.next();
-            if (exp.getType() == SQLExpressionFragment.LOGICAL_EXPRESSION_TYPE && exp.getPrefixValue().equals(name))
-                return true;
-        }
-        return false;
-    }
-
-    public int getUniqueColumnCount()
-    {
-        return expressionUniqueColumnNames.size();
-    }
-
-    public String[] getUniqueExpressionNames()
-    {
-        String[] names = new String[getUniqueColumnCount()];
-        Iterator<String> it = expressionUniqueColumnNames.iterator();
-        int i = 0;
-        while (it.hasNext())
-        {
-            names[i++] = it.next();
-        }
-        return names;
-    }
-
-    public boolean isOrOperatorUsed()
-    {
-        return orOperatorUsed;
-    }
-}

+ 0 - 699
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/test/jdbcdriver/HPCCDriverTest.java

@@ -1,699 +0,0 @@
-package com.hpccsystems.test.jdbcdriver;
-
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import com.hpccsystems.jdbcdriver.HPCCConnection;
-import com.hpccsystems.jdbcdriver.HPCCDatabaseMetaData;
-import com.hpccsystems.jdbcdriver.HPCCDriver;
-import com.hpccsystems.jdbcdriver.HPCCPreparedStatement;
-import com.hpccsystems.jdbcdriver.HPCCResultSet;
-
-public class HPCCDriverTest
-{
-	static private HPCCDriver driver;
-
-	static
-	{
-		driver	= new HPCCDriver();
-	}
-
-	@SuppressWarnings("unused")
-	private static boolean  testLazyLoading(Properties conninfo)
-	{
-		boolean success = true;
-		try
-		{
-			conninfo.put("LazyLoad", "true");
-			HPCCConnection connection = (HPCCConnection) driver.connect("",conninfo);
-
-			System.out.println("No query nor file loading should have occured yet.");
-
-			ResultSet procs = connection.getMetaData().getProcedures(null, null, null);
-
-			System.out.println("Queries should be cached now. No files should be cached yet.");
-
-			System.out.println("procs found: ");
-			while (procs.next())
-			{
-				System.out.println("   " + procs.getString("PROCEDURE_NAME"));
-			}
-
-			ResultSet tables = connection.getMetaData().getTables(null, null, "%",new String[] {""} );
-
-			System.out.println("Tables found: ");
-			while (tables.next())
-			{
-				System.out.println("   " + tables.getString("TABLE_NAME") + " Remarks: \'" + tables.getString("REMARKS")+"\'");
-			}
-
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-			System.out.println(e.getMessage());
-			success = false;
-		}
-		return success;
-	}
-
-	private static boolean  createStandAloneDataMetadata(Properties conninfo)
-	{
-		boolean success = true;
-		try
-		{
-			HPCCDatabaseMetaData dbmetadata = new HPCCDatabaseMetaData(conninfo);
-			success = getDatabaseInfo(dbmetadata);
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-			System.out.println(e.getMessage());
-			success = false;
-		}
-		return success;
-	}
-
-	private static HPCCConnection  connectViaProps(Properties conninfo)
-	{
-		HPCCConnection connection = null;
-		try
-		{
-			connection = (HPCCConnection) driver.connect("",conninfo);
-		}
-		catch (Exception e)	{}
-		return connection;
-	}
-
-	private static HPCCConnection  connectViaUrl(String conninfo)
-	{
-		HPCCConnection connection = null;
-		try
-		{
-			connection = (HPCCConnection) driver.connect(conninfo, null);
-		}
-		catch (Exception e)	{}
-		return connection;
-	}
-
-	@SuppressWarnings("unused")
-	private static boolean printouttable(HPCCConnection connection, String tablename)
-	{
-		boolean success = true;
-		try
-		{
-			ResultSet table = connection.getMetaData().getTables(null, null, tablename, null);
-
-			while (table.next())
-				System.out.println("\t" + table.getString("TABLE_NAME"));
-		}
-		catch (Exception e)
-		{
-			success = false;
-		}
-		return success;
-	}
-
-	@SuppressWarnings("unused")
-	private static boolean printoutExportedKeys(HPCCConnection connection)
-	{
-		boolean success = true;
-		try
-		{
-			ResultSet keys = connection.getMetaData().getExportedKeys(null,null, null);
-
-			//while (table.next())
-				//System.out.println("\t" + table.getString("TABLE_NAME"));
-		}
-		catch (Exception e)
-		{
-			success = false;
-		}
-		return success;
-	}
-
-	@SuppressWarnings("unused")
-	private static boolean printouttables(HPCCConnection connection)
-	{
-		boolean success = true;
-		try
-		{
-			ResultSet tables = connection.getMetaData().getTables(null, null, "%", null);
-
-			System.out.println("Tables found: ");
-			while (tables.next())
-				System.out.println("\t" + tables.getString("TABLE_NAME"));
-		}
-		catch (Exception e)
-		{
-			success = false;
-		}
-		return success;
-	}
-
-	@SuppressWarnings("unused")
-	private static boolean printouttablecols(HPCCConnection connection, String tablename)
-	{
-		boolean success = true;
-		try
-		{
-			ResultSet tablecols = connection.getMetaData().getColumns(null, null, tablename, "%");
-
-			System.out.println("Table cols found: ");
-			while (tablecols.next())
-				System.out.println("\t" +
-			tablecols.getString("TABLE_NAME") +
-			"::" +
-			tablecols.getString("COLUMN_NAME") +
-			"( " + tablecols.getString("TYPE_NAME") + " )");
-		}
-		catch (Exception e)
-		{
-			success = false;
-		}
-		return success;
-	}
-
-	private static boolean printoutalltablescols(HPCCConnection connection)
-	{
-		boolean success = true;
-		try
-		{
-			ResultSet tablecols = connection.getMetaData().getColumns(null, null, "%", "%");
-
-			System.out.println("Table cols found: ");
-			while (tablecols.next())
-				System.out.println("\t" +
-			tablecols.getString("TABLE_NAME") +
-			"::" +
-			tablecols.getString("COLUMN_NAME") +
-			"( " + tablecols.getString("TYPE_NAME") + " )");
-		}
-		catch (Exception e)
-		{
-			success = false;
-		}
-		return success;
-	}
-
-	private static boolean printoutprocs(HPCCConnection connection)
-	{
-		boolean success = true;
-		try
-		{
-			ResultSet procs = connection.getMetaData().getProcedures(null, null, null);
-
-			System.out.println("procs found: ");
-			while (procs.next())
-				System.out.println("\t" + procs.getString("PROCEDURE_NAME"));
-
-		}
-		catch (Exception e)
-		{
-			success = false;
-		}
-		return success;
-	}
-
-	@SuppressWarnings("unused")
-	private static boolean  printoutproccols(HPCCConnection connection)
-	{
-		boolean success = true;
-		try
-		{
-			ResultSet proccols = connection.getMetaData().getProcedureColumns(null, null, null, null);
-
-			System.out.println("procs cols found: ");
-			while (proccols.next())
-				System.out.println("\t" + proccols.getString("PROCEDURE_NAME") + proccols.getString("PROCEDURE_NAME") + "::" +proccols.getString("COLUMN_NAME") + " (" + proccols.getInt("COLUMN_TYPE") + ")");
-
-		}
-		catch (Exception e)
-		{
-			success = false;
-		}
-		return success;
-	}
-
-	private static boolean  executeFreeHandSQL(Properties conninfo, String SQL, List<String> params)
-	{
-		boolean success = true;
-		try
-		{
-			HPCCConnection connectionprops = connectViaProps(conninfo);
-			if (connectionprops == null)
-				throw new Exception("Could not connect with properties object");
-
-			PreparedStatement p = connectionprops.prepareStatement(SQL);
-			p.clearParameters();
-
-			for(int i = 0; i< params.size(); i++)
-			{
-				p.setObject(i+1, params.get(i));
-			}
-
-			HPCCResultSet qrs = (HPCCResultSet)((HPCCPreparedStatement)p).executeQuery();
-
-			ResultSetMetaData meta = qrs.getMetaData();
-			System.out.println();
-
-			for (int i = 1; i <= meta.getColumnCount(); i++)
-			{
-				System.out.print("[*****" + meta.getColumnName(i) + "*****]");
-			}
-			System.out.println("");
-			for (int i = 1; i <= meta.getColumnCount(); i++)
-			{
-				System.out.print("[^^^^^" + meta.getColumnLabel(i) + "^^^^^]");
-			}
-			System.out.println();
-			for (int i = 1; i <= meta.getColumnCount(); i++)
-			{
-				System.out.print("[+++++" + HPCCDatabaseMetaData.convertSQLtype2JavaClassName(meta.getColumnType(i)) + "+++++]");
-			}
-
-			while (qrs.next())
-			{
-				System.out.println();
-				for (int i = 1; i <= meta.getColumnCount(); i++)
-				{
-					System.out.print("[ " + qrs.getObject(i) + " ]");
-				}
-			}
-			System.out.println("\nTotal Records found: " + qrs.getRowCount());
-		}
-		catch (Exception e)
-		{
-			System.err.println(e.getMessage());
-			success = false;
-		}
-		return success;
-	}
-
-	private static boolean  testSelect1(HPCCConnection connection)
-	{
-		boolean success = true;
-		try
-		{
-			PreparedStatement p = connection.prepareStatement("Select 1 AS ONE");
-
-			HPCCResultSet qrs = (HPCCResultSet)((HPCCPreparedStatement)p).executeQuery();
-
-			System.out.println("---------Testing Select 1---------------");
-
-			while (qrs.next())
-			{
-				if(qrs.getInt(1) != 1)
-					success = false;
-			}
-
-			System.out.println("\tTest Success: " + success);
-		}
-		catch (Exception e)
-		{
-			System.err.println(e.getMessage());
-			success = false;
-		}
-		return success;
-	}
-
-	private static boolean getDatabaseInfo(HPCCConnection conn)
-	{
-		try
-		{
-			return getDatabaseInfo((HPCCDatabaseMetaData)conn.getMetaData());
-		}
-		catch (SQLException e)
-		{
-			e.printStackTrace();
-			return false;
-		}
-	}
-
-	private static boolean getDatabaseInfo(HPCCDatabaseMetaData dbmetadata)
-	{
-		boolean success = true;
-		try
-		{
-			String hpccname = dbmetadata.getDatabaseProductName();
-			String hpccprodver = dbmetadata.getDatabaseProductVersion();
-			int major = dbmetadata.getDatabaseMajorVersion();
-			int minor = dbmetadata.getDatabaseMinorVersion();
-			String sqlkeywords = dbmetadata.getSQLKeywords();
-
-			System.out.println("HPCC System Info:");
-			System.out.println("\tProduct Name: " + hpccname);
-			System.out.println("\tProduct Version: " + hpccprodver);
-			System.out.println("\tProduct Major: " + major);
-			System.out.println("\tProduct Minor: " + minor);
-			System.out.println("\tDriver Name: " + dbmetadata.getDriverName());
-			System.out.println("\tDriver Major: " + dbmetadata.getDriverMajorVersion());
-			System.out.println("\tDriver Minor: " + dbmetadata.getDriverMinorVersion());
-			System.out.println("\tSQL Key Words: " + sqlkeywords);
-		}
-		catch (Exception e)
-		{
-			System.out.println(e.getMessage());
-			success = false;
-		}
-		return success;
-	}
-
-	public static synchronized boolean printOutResultSet(HPCCResultSet resultset, long threadid )
-	{
-		System.out.println("Servicing thread id: " + threadid);
-
-		int padvalue = 20;
-		boolean isSuccess = true;
-		try
-		{
-			ResultSetMetaData meta = resultset.getMetaData();
-
-			System.out.println();
-
-			for (int i = 1; i <= meta.getColumnCount(); i++)
-			{
-				String colname = meta.getColumnName(i);
-				System.out.print("[");
-
-				for (int y = 0; y < (colname.length()>=padvalue ? 0 : (padvalue - colname.length())/2); y++)
-					System.out.print(" ");
-				System.out.print(colname);
-
-				for (int y = 0; y < (colname.length()>=padvalue ? 0 : (padvalue - colname.length())/2); y++)
-					System.out.print(" ");
-
-				System.out.print("]");
-			}
-			System.out.println("");
-
-			for (int i = 1; i <= meta.getColumnCount(); i++)
-			{
-				String collabel = meta.getColumnLabel(i);
-				System.out.print("[");
-
-				for (int y = 0; y < (collabel.length()>=padvalue ? 0 : (padvalue - collabel.length())/2); y++)
-					System.out.print("^");
-				System.out.print(collabel);
-
-				for (int y = 0; y < (collabel.length()>=padvalue ? 0 : (padvalue - collabel.length())/2); y++)
-					System.out.print("^");
-
-				System.out.print("]");
-			}
-			System.out.println();
-
-			for (int i = 1; i <= meta.getColumnCount(); i++)
-			{
-				String coltype = HPCCDatabaseMetaData.convertSQLtype2JavaClassName(meta.getColumnType(i));
-				System.out.print("[");
-
-				for (int y = 0; y < (coltype.length()>=padvalue ? 0 : (padvalue - coltype.length())/2); y++)
-					System.out.print(" ");
-				System.out.print(coltype);
-
-				for (int y = 0; y < (coltype.length()>=padvalue ? 0 : (padvalue - coltype.length())/2); y++)
-					System.out.print(" ");
-
-				System.out.print("]");
-			}
-
-			while (resultset.next())
-			{
-				System.out.println();
-				for (int i = 1; i <= meta.getColumnCount(); i++)
-				{
-					String result = (String)resultset.getObject(i);
-					System.out.print("[");
-
-					for (int y = 0; y < (result.length()>=padvalue ? 0 : padvalue - result.length()); y++)
-						System.out.print(" ");
-					System.out.print(result);
-					System.out.print("]");
-				}
-			}
-
-			System.out.println("\nTotal Records found: " + resultset.getRowCount());
-		}
-		catch (Exception e)
-		{
-			System.out.println(e.getMessage());
-			isSuccess = false;
-		}
-		return isSuccess;
-	}
-
-	private static boolean runFullTest(Properties propsinfo, String urlinfo)
-	{
-		List<HPCCDriverTestThread> runnables = new ArrayList<HPCCDriverTestThread>();
-
-		boolean success = true;
-		try
-		{
-			//success &= testLazyLoading(propsinfo);
-
-			success &= createStandAloneDataMetadata(propsinfo);
-
-			HPCCConnection connectionprops = connectViaProps(propsinfo);
-			if (connectionprops == null)
-				throw new Exception("Could not connect with properties object");
-
-			success &= getDatabaseInfo(connectionprops);
-
-			HPCCConnection connectionurl = connectViaUrl(urlinfo);
-			if (connectionurl == null)
-				throw new Exception("Could not connect with URL");
-
-			success &= getDatabaseInfo(connectionurl);
-
-			//PreparedStatement p = connectionprops.prepareStatement(
-					//"select  * from thor::full_test_distributed_index where lname = BRYANT , fname = whoknows group by zips order by birth_month DESC"
-					//"select  * from thor::full_test_distributed_index where lname = BRYANT AND fname = SILVA "
-
-					//"select  x, 'firstname', 1  from tutorial::rp::tutorialperson where  firstname >= ? and firstname >= ? limit 1000"
-					//"select  count(*) from tutorial::rp::tutorialperson where  firstname = 'A' or firstname = 'Z' limit 1000"
-					//"select  firstname from tutorial::rp::tutorialperson where  middlename =' ' "
-					//"select  * from tutorial::rp::tutorialperson where zip = ? and  middlename>='W'    city='DELRAY BEACH' limit 1000" );
-					//"select * from tutorial::rp::tutorialperson where firstname = 'MARICHELLE'  order by lastname ASC, firstname DESC limit 1000"
-					//"select count(*) from tutorial::rp::tutorialperson"
-					//"select tutorial::rp::peoplebyzipindex.zip from \n tutorial::rp::peoplebyzipindex order by zip"
-					//"select zip, count( * ) from tutorial::rp::tutorialperson  group by zip"
-					//"select city, zip, count(*) from tutorial::rp::tutorialperson where zip ='33445' limit 1000"
-					//"select city from tutorial::rp::tutorialperson USE INDEX(tutorial::rp::peoplebyzipindex2) where zip = ? "
-					//"select count(*) from tutorial::rp::tutorialperson USE INDEX(0) where zip > ?"
-					//"select count(city) as citycount from tutorial::rp::tutorialperson where zip = '33445'"//where zip = '33445'"
-					//"select * from enron::final where tos = 'randy.young@enron.com' limit 1000"
-					//"select count(*), zip from tutorial::rp::tutorialperson where zip = '33445' "
-					//"select zip from tutorial::rp::tutorialperson where zip < '32605' group by zip"
-					//"select MAX(firstname), lastname from tutorial::rp::tutorialperson  limit 1000"
-					//"select 1"
-					//"select count(persons.zip) as zipcount, persons.city as mycity from tutorial::rp::tutorialperson as persons where persons.city = 'ABBEVILLE' "
-					//"select min(zip) as maxzip from tutorial::rp::tutorialperson as persons where persons.city = 'ABBEVILLE' "
-					//"select 1 as ONE"
-					//"call myroxie::fetchpeoplebyzipservice(33445)"
-					//"call fetchpeoplebyzipservice(33445)"
-					//"call fetchpeoplebyzipservice(33445)"
-					//"select * from .::doughenschen__infinity_rollup_best1"
-					//"select * from regress::hthor::dg_memfile where u2 = ? limit 100"
-					//"select MIN(zip), city from tutorial::rp::tutorialperson where zip  > '33445'"
-
-					//"select tbl.* from progguide::exampledata::peopleaccts tbl"
-					//"select firstname, lastname, middlename, city, street, state, zip from tutorial::rp::tutorialperson where firstname = VIMA LIMIT 1000"
-					//"select tbl.* from progguide::exampledata::people tbl"
-
-					//"select * from certification::full_test_distributed limit 100"
-					//"select * from certification::full_test_distributed where birth_state = FL LIMIT 1000"
-					//"select * from customer::customer"
-					//"select count(*) from tutorial::rp::tutorialperson"
-					//"select * from tutorial::rp::tutorialperson"
-
-					//"select tbl.* from .::xdbcsample tbl"
-					//"select tbl.* from fetchpeoplebyzipservice tbl where zipvalue=33445  order by fname DESC group by zip limit 10"
-					//"select tbl.* from fetchpeoplebyzipservice tbl where zipvalue=33445 group by zip, fname order by fname DESC, lname, zip ASC limit 10"
-					//"call fetchpeoplebyzipservice(?)"
-					//"select tbl.* from bestdemo tbl "
-					//"select * fname from fetchpeoplebyzipservice"
-
-					//);
-
-					Properties params = new Properties();
-					params.put("1", "'BAYLISS'");
-					HPCCDriverTestThread workThread1 = new HPCCDriverTestThread(connectionprops, "select * from regress::hthor_payload::dg_flat where dg_lastname = ? limit 100", params);
-					runnables.add(workThread1);
-
-					Properties params2 = new Properties();
-					params2.put("1", "65535");
-					HPCCDriverTestThread workThread2 = new HPCCDriverTestThread(connectionprops, "select * from regress::hthor::dg_memfile where u2 = ? limit 100", params2);
-					runnables.add(workThread2);
-
-					Properties params3 = new Properties();
-					params3.put("1", "65535");
-					HPCCDriverTestThread workThread3 = new HPCCDriverTestThread(connectionprops, "select * from regress::hthor::dg_memfile where u2 < ? and u2 != 65536 limit 10000", params3);
-					runnables.add(workThread3);
-
-					for (HPCCDriverTestThread thrd : runnables)
-					{
-						thrd.start();
-					}
-
-					boolean threadsrunning;
-					do
-					{
-						threadsrunning = false;
-						for (HPCCDriverTestThread thrd : runnables)
-						{
-							threadsrunning = thrd.isRunning() || threadsrunning;
-						}
-						Thread.sleep(250);
-					}
-					while (threadsrunning);
-
-					for (HPCCDriverTestThread thrd : runnables)
-					{
-						success &= thrd.isSuccess();
-					}
-
-					success &= testSelect1(connectionprops);
-					//success &= printoutExportedKeys(connectionprops);
-					//success &= printouttable(connectionprops, ".::doughenschen__infinity_rollup_best1");
-					//success &= printouttables(connectionprops);
-					success &= printoutalltablescols(connectionprops);
-					//success &= printouttablecols(connectionprops,".::doughenschen__infinity_rollup_best1");
-					//success &= printoutprocs(connectionprops);
-					//success &= printoutproccols(connectionprops);
-
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-			System.out.println(e.getMessage());
-			success = false;
-		}
-		return success;
-	}
-
-	public static void main(String[] args)
-	{
-		boolean success = true;
-		boolean expectedFailure = false;
-
-		try
-		{
-			Properties info = new Properties();
-			List<String> params = new ArrayList<String>();
-			String infourl = "";
-
-			if(args.length <= 0)
-			{
-				info.put("ServerAddress", "192.168.124.128");
-				info.put("LazyLoad", "false");
-				info.put("Cluster", "myroxie");
-				info.put("QuerySet", "thor");
-				info.put("WsECLWatchPort", "8010");
-				info.put("WsECLDirectPort", "8008");
-				info.put("EclResultLimit", "ALL");
-
-				infourl = "url:jdbc:ecl;ServerAddress=192.168.124.128;Cluster=myroxie;EclResultLimit=8";
-
-				//success &= runFullTest(info, infourl);
-
-				params.add("'33445'");
-				params.add("'90210'");
-
-				success &= executeFreeHandSQL(info, "select count(persons.lastname) as zipcount, persons.city as mycity , zip from tutorial::rp::tutorialperson persons USE INDEX(0) limit 100", params);
-				success &= executeFreeHandSQL(info, "select count(*), persons.firstname, persons.lastname from tutorial::rp::tutorialperson as persons limit 10", params);
-				success &= executeFreeHandSQL(info, "select persons.firstname, persons.lastname from tutorial::rp::tutorialperson as persons where persons.firstname < 'a' limit 10", params);
-				success &= executeFreeHandSQL(info, "select count(persons.firstname), persons.firstname, persons.lastname from tutorial::rp::tutorialperson as persons where persons.zip < '33445' limit 10", params);
-				success &= executeFreeHandSQL(info, "select min(persons.firstname), persons.firstname, persons.lastname from tutorial::rp::tutorialperson as persons where persons.firstname < 'a' limit 10", params);
-				success &= executeFreeHandSQL(info, "select max(persons.firstname), persons.firstname, persons.lastname from tutorial::rp::tutorialperson as persons where persons.zip < '33445' limit 10", params);
-
-				//Join where first table is index, and join table is not
-				success &= executeFreeHandSQL(info, "select persons.firstname, persons.lastname from tutorial::rp::peoplebyzipindex3 as persons outer join 	tutorial::rp::tutorialperson as people2 on people2.firstname = persons.firstname where firstname > 'A' limit 10", params);
-
-				//Join where first table is logical file, and join table is index file
-				//Seems to fail with this message:
-				//' Keyed joins only support LEFT OUTER/ONLY'
-				expectedFailure |= !(executeFreeHandSQL(info, "select persons.firstname, persons.lastname from tutorial::rp::tutorialperson2 as persons outer join tutorial::rp::peoplebyzipindex2 as people2 on people2.firstname = persons.firstname limit 10", params));
-
-				//Join where both tables are index files
-				//Seems to fail with this message:
-				//' Keyed joins only support LEFT OUTER/ONLY'
-				expectedFailure |= !(executeFreeHandSQL(info, "select persons.firstname, persons.lastname from tutorial::rp::peoplebyzipindex3 as persons outer join 	tutorial::rp::peoplebyzipindex2 as people2 on people2.firstname = persons.firstname limit 10", params));
-
-				success &= executeFreeHandSQL(info, "select min(persons.firstname), persons.firstname, persons.lastname from tutorial::rp::tutorialperson as persons where persons.firstname < 'a' limit 10", params);
-				success &= executeFreeHandSQL(info, "select max(persons.firstname), persons.firstname, persons.lastname from tutorial::rp::tutorialperson as persons where persons.zip < '33445' limit 10", params);
-
-				expectedFailure |= !(executeFreeHandSQL(info, "select max(persons.lastname), persons.firstname, persons.lastname from tutorial::rp::tutorialperson as persons outer join 	tutorial::rp::tutorialperson as people2 on people2.firstname = persons.firstname where persons.firstname > 'a' order by persons.lastname ASC, persons.firstname DESC limit 10", params));
-
-				success &= executeFreeHandSQL(info, "select count(persons.zip) as zipcount, persons.city as mycity , zip from super::super::tutorial::rp::tutorialperson as persons where persons.zip > ? AND persons.zip < ? group by zip limit 100", params);
-				expectedFailure |= !(executeFreeHandSQL(info, "select count(persons.zip) as zipcount, persons.city as mycity , zip, p2.ball from super::super::tutorial::rp::tutorialperson as persons join thor::motionchart_motion_chart_test_fixed as p2 on p2.zip = persons.zip where persons.zip > ? group by zip limit 10", params));
-				success &= executeFreeHandSQL(info, "select acct.account, acct.personid, persons.firstname, persons.lastname from progguide::exampledata::people as persons outer join 	progguide::exampledata::accounts as acct on acct.personid = persons.personid  where persons.personid > 5 limit 10", params);
-				success &= executeFreeHandSQL(info, "select count(persons.personid), persons.firstname, persons.lastname from progguide::exampledata::people as persons  limit 10", params);
-				expectedFailure |=  !(executeFreeHandSQL(info, "select count(persons.zip) as zipcount, persons.city as mycity , zip, p2.ball from super::super::tutorial::rp::tutorialperson as persons join tutorial::rp::tutorialperson2 as p2 on p2.zip = persons.zip where persons.zip > ? group by zip limit 10", params));
-
-			}
-			else
-			{
-				System.out.println("********************************************************************");
-				System.out.println("HPCC JDBC Test Package Usage:");
-				System.out.println(" Connection Parameters: paramname==paramvalue");
-				System.out.println(" eg. ServerAddress==192.168.124.128");
-				System.out.println(" Prepared Statement param value: \"param\"==paramvalue");
-				System.out.println(" eg. param==\'33445\'");
-				System.out.println();
-				System.out.println(" By default full test is executed.");
-				System.out.println(" To execute free hand sql:");
-				System.out.println("  freehandsql==<SQL STATEMENT>");
-				System.out.println("  eg. freehandsql==\"select * from tablename where zip=? limit 100\"");
-				System.out.println("********************************************************************\n");
-
-				String freehand = null;
-				for (int i = 0; i < args.length; i++)
-				{
-					String [] propsplit = args[i].split("==");
-					if( propsplit.length == 1)
-					{
-						info.put(propsplit[0], "true");
-						System.out.println("added prop: " + propsplit[0] + " = true");
-					}
-					else if ( propsplit.length == 2)
-					{
-						if (propsplit[0].equalsIgnoreCase("param"))
-						{
-							params.add(propsplit[1]);
-							System.out.println("added param( " + (params.size()) + " ) = " + propsplit[1]);
-						}
-						else
-						{
-							info.put(propsplit[0], propsplit[1]);
-							System.out.println("added prop: " + propsplit[0] + " = " + propsplit[1]);
-						}
-					}
-					else
-						System.out.println("arg["+i+"] ignored");
-				}
-
-				if (info.containsKey("freehandsql"))
-				{
-					freehand = info.getProperty("freehandsql");
-					success &= executeFreeHandSQL(info, freehand, params);
-				}
-				else
-					success &= runFullTest(info, infourl);
-			}
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-			System.out.println(e.getMessage());
-			success = false;
-		}
-
-		System.out.println("\nHPCC Driver test " + (success ? "passed" : "failed") + (expectedFailure ? "; Expected failure(s) detected " : "" ) + " - Verify results.");
-	}
-}

+ 0 - 64
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/test/jdbcdriver/HPCCDriverTestThread.java

@@ -1,64 +0,0 @@
-package com.hpccsystems.test.jdbcdriver;
-
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-import java.util.Properties;
-
-import com.hpccsystems.jdbcdriver.HPCCConnection;
-import com.hpccsystems.jdbcdriver.HPCCPreparedStatement;
-import com.hpccsystems.jdbcdriver.HPCCResultSet;
-
-public class HPCCDriverTestThread extends Thread
-{
-	private HPCCConnection theconnection;
-	private String thesql;
-	private Properties theparams;
-	private boolean success;
-	private boolean running;
-
-	public HPCCDriverTestThread(HPCCConnection connection, String SqlStr, Properties parameters)
-	{
-		theconnection = connection;
-		thesql = SqlStr;
-		theparams = parameters;
-		success = true;
-		running = false;
-	}
-
-	@Override
-	public void run()
-	{
-		PreparedStatement prepstatement;
-		try
-		{
-			running = true;
-			prepstatement = theconnection.prepareStatement(thesql);
-
-			prepstatement.clearParameters();
-			for(int i = 1; i <= theparams.size(); i++)
-				prepstatement.setObject(i, theparams.getProperty(String.valueOf(i)));
-
-			HPCCResultSet qrs = (HPCCResultSet)((HPCCPreparedStatement)prepstatement).executeQuery();
-			HPCCDriverTest.printOutResultSet(qrs, Thread.currentThread().getId());
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-			success = false;
-		}
-		finally
-		{
-			running = false;
-		}
-	}
-
-	public boolean isSuccess()
-	{
-		return success;
-	}
-
-	public boolean isRunning()
-	{
-		return running;
-	}
-}

+ 0 - 152
plugins/dbconnectors/hpccjdbc/src/com/hpccsystems/test/jdbcdriver/SQLParserTest.java

@@ -1,152 +0,0 @@
-package com.hpccsystems.test.jdbcdriver;
-
-import java.util.List;
-
-import com.hpccsystems.jdbcdriver.HPCCColumnMetaData;
-import com.hpccsystems.jdbcdriver.SQLParser;
-
-public class SQLParserTest
-{
-	static private SQLParser parser;
-
-	static
-	{
-		parser	= new SQLParser();
-	}
-
-	static private boolean testSelectALL(String tablename)
-	{
-		boolean success = true;
-		try
-		{
-			parser.process("select * from " + tablename);
-			success = parser.getTableName().equals(tablename) ? true : false;
-
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-			System.out.println(e.getMessage());
-			success = false;
-		}
-
-		return success;
-	}
-
-	static private boolean testTableAlias(String tablename, String alias)
-	{
-		boolean success = true;
-		try
-		{
-			parser.process("select * from " + tablename + " AS " + alias);
-			success &= parser.getTableName().equals(tablename) ? true : false;
-			success &= parser.getTableAlias().equals(alias) ? true : false;
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-			System.out.println(e.getMessage());
-			success = false;
-		}
-
-		return success;
-	}
-
-	static private boolean testFreeHandSQL(String sql)
-	{
-		boolean success = true;
-		try
-		{
-			parser.process(sql);
-
-			int sqltype = parser.getSqlType();
-
-			System.out.print("SQL request type: ");
-			List<HPCCColumnMetaData> cols = parser.getSelectColumns();
-			switch (sqltype)
-			{
-			case SQLParser.SQL_TYPE_SELECT:
-				System.out.println("SELECT");
-				System.out.print("Select Columns: [ ");
-				for (int i = 0; i < cols.size(); i++)
-				{
-					HPCCColumnMetaData col = cols.get(i);
-					System.out.print(col.getColumnName() + " " + (col.getAlias() != null ?
-							"(" + col.getAlias()  + ") " : ""));
-				}
-				System.out.println(" ] ");
-				System.out.println("Table Name: " + parser.getTableName());
-				System.out.println("Table Alias: " + parser.getTableAlias());
-				System.out.println("Index Hint: " + parser.getIndexHint());
-				if (parser.hasJoinClause())
-					System.out.println("Join Clause: " + parser.getJoinClause().toString());
-				System.out.println("Where Clause: " + parser.getWhereClauseString());
-				if (parser.hasGroupByColumns())
-					System.out.println("Group By: " + parser.getGroupByString(','));
-				if (parser.hasOrderByColumns())
-					System.out.println("Group By: " + parser.getOrderByString(','));
-				break;
-			case SQLParser.SQL_TYPE_SELECTCONST:
-				System.out.println("SELECT CONSTANT");
-				System.out.println("Select Columns: [ ");
-				for (int i = 0; i < cols.size(); i++)
-				{
-					System.out.println(cols.get(i).getColumnName() + "( " + cols.get(i).getAlias());
-				}
-				System.out.println(" ] ");
-				break;
-			case SQLParser.SQL_TYPE_CALL:
-				System.out.println("CALL");
-				System.out.println("Stored Procedure name: " + parser.getStoredProcName());
-				String spvals [] = parser.getStoredProcInParamVals();
-				System.out.print("Stored Procedure input params : (");
-				for(int i = 0; i < spvals.length; i++)
-				{
-					System.out.print(spvals[i] + " ");
-				}
-				System.out.println(")");
-				break;
-			case SQLParser.SQL_TYPE_UNKNOWN:
-			default:
-				System.out.print("not detected");
-				break;
-			}
-
-			if (parser.hasLimitBy())
-				System.out.println("Limit by: " + parser.getLimit());
-
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-			System.out.println(e.getMessage());
-			success = false;
-		}
-
-		return success;
-	}
-
-	public static void main(String[] args) throws Exception
-	{
-		boolean success = true;
-
-		try
-		{
-			success &= testSelectALL("mytablename");
-			success &= testTableAlias("mytablename", "mytablealias");
-			success &= testFreeHandSQL("select city as mycity, persons.zip, count(*) from tutorial::rp::tutorialperson as persons USE INDEX(myindex) where zip ='33445' limit 1000");
-			success &= testFreeHandSQL("call peoplebyzip(33445) limit 1000");
-			success &= testFreeHandSQL("select * from tablename1 JOIN tablename2 tablealias2 On tablealias2.a = tablename.a limit 1000");
-			success &= testFreeHandSQL("select col1 as colONE, col2 as colTWO from tablename1 t1 JOIN tablename2 tablealias2 On tablealias2.a = t1.a where t1.a > 300 limit 1000");
-			success &= testFreeHandSQL("select col1 as colONE, col2 as colTWO from tablename1 t1 JOIN tablename2 tablealias2 On tablealias2.a = a limit 1000");
-		}
-		catch (Exception e)
-		{
-			e.printStackTrace();
-			System.out.println(e.getMessage());
-			success = false;
-		}
-
-		System.out.println("\nParser test " + (success ? " did not cause exceptions, please verify output! " : "failed!"));
-	}
-}