id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
146510094_381 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testIsNotNull() {\n NullPartition partition = new NullPartition(COL_RAW, false);\n String constraint = partition.toSqlConstraint(QUOTE, dbProduct);\n\n assertEquals(COL + \" IS NOT NULL\", constraint);\n }",
"class_method_signature": "NullPartitionTest.testI... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "isNull",
"modifier": "private final... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n\n StringBuilder sb = new StringBuilder();\n\n String columnQuoted = quoteString + ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_155 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void throwsWhenRequiredTxnIdHeaderIsMissing() throws Exception {\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"Header X-GP-XID is missing in the request\");\n when(mockServletRequest.getHeader(\"X-GP-USER\")).thenRetur... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecurityServletFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecurityServletFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)\n throws IOException, ServletException {\n\n // retrieve user header and make sure header is present and is not empty\n final String gpdbUser = getHeaderValue(... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_293 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "resolve... | {
"body": "@Test\n public void testInitialize() {\n resolver.initialize(context);\n }",
"class_method_signature": "ParquetResolverTest.testInitialize()",
"constructor": false,
"full_signature": "@Test public void testInitialize()",
"identifier": "testInitialize",
"invocations": [
"initializ... | {
"fields": [
{
"declarator": "TIMESTAMP_PATTERN = Pattern.compile(\"[+-]\\\\d{2}(:\\\\d{2})?$\")",
"modifier": "public static final",
"original_string": "public static final Pattern TIMESTAMP_PATTERN = Pattern.compile(\"[+-]\\\\d{2}(:\\\\d{2})?$\");",
"type": "Pattern",
"var_name": ... | {
"body": "@Override\n public void initialize(RequestContext requestContext) {\n super.initialize(requestContext);\n this.columnDescriptors = context.getTupleDescription();\n }",
"class_method_signature": "ParquetResolver.initialize(RequestContext requestContext)",
"constructor": false,
"ful... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_339 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromQueryEndingInSemicolon() throws Exception {\n String serversDirectory = new File(this.getClass().getClassLoader().getResource(\"servers\").toURI()).getCanonicalPath();\n context.getAdditionalConfigProps().put(\"pxf.config.server.directory\", serversDirectory... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(JdbcAccessor.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(JdbcAccessor.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarat... | {
"body": "@Override\n public boolean openForRead() throws SQLException, SQLTimeoutException, ParseException {\n if (statementRead != null && !statementRead.isClosed()) {\n return true;\n }\n\n Connection connection = super.getConnection();\n SQLQueryBuilder sqlQueryBuilder =... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_72 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void invalidDirectoryName() {\n assertFalse(Utilities.isValidDirectoryName(null));\n assertFalse(Utilities.isValidDirectoryName(\"\\0\"));\n }",
"class_method_signature": "UtilitiesTest.invalidDirectoryName()",
"constructor": false,
"full_signature": "@Test public v... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static boolean isValidDirectoryName(String name) {\n return isValidRestrictedDirectoryName(name, false);\n }",
"class_method_signature": "Utilities.isValidDirectoryName(String name)",
"constructor": false,
"full_signature": "public static boolean isValidDirectoryName(String name)",
... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_342 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromQueryWithWhereWithPartitions() throws Exception {\n String serversDirectory = new File(this.getClass().getClassLoader().getResource(\"servers\").toURI()).getCanonicalPath();\n context.getAdditionalConfigProps().put(\"pxf.config.server.directory\", serversDir... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(JdbcAccessor.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(JdbcAccessor.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarat... | {
"body": "@Override\n public boolean openForRead() throws SQLException, SQLTimeoutException, ParseException {\n if (statementRead != null && !statementRead.isClosed()) {\n return true;\n }\n\n Connection connection = super.getConnection();\n SQLQueryBuilder sqlQueryBuilder =... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_207 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void testInvalidStatsSampleRatioValue() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"For input string: \\\"a\\\"\");\n\n parameters.putSingle(\"X-GP-OPTIONS-STATS-SAMPLE-RATIO\", \"a\");\n parser.parseRequest(mockRequestHeaders, R... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_179 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void malformedProfileFile() {\n expectedException.expect(ProfileConfException.class);\n expectedException.expectMessage(\"pxf-profiles-default.xml could not be loaded: org.xml.sax.SAXParseException\");\n\n ProfilesConf profilesConf = getProfilesConf(\"malformedProfile... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public Map<String, String> getPlugins(String profileName) {\n Profile profile = getProfile(profileName);\n Map<String, String> result = profile.getPluginsMap();\n if (result.isEmpty()) {\n throw new ProfileConfException(NO_PLUGINS_IN_PROFILE_DEF, profileName, ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_25 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "context... | {
"body": "@Test\n public void testReturnDefaultIntOptionValue() {\n assertEquals(77, context.getOption(\"foo\", 77));\n }",
"class_method_signature": "RequestContextTest.testReturnDefaultIntOptionValue()",
"constructor": false,
"full_signature": "@Test public void testReturnDefaultIntOptionValue()... | {
"fields": [
{
"declarator": "requestType",
"modifier": "private",
"original_string": "private RequestType requestType;",
"type": "RequestType",
"var_name": "requestType"
},
{
"declarator": "accessor",
"modifier": "private",
"original_string": "private Stri... | {
"body": "public String getOption(String option, String defaultValue) {\n return options.getOrDefault(option, defaultValue);\n }",
"class_method_signature": "RequestContext.getOption(String option, String defaultValue)",
"constructor": false,
"full_signature": "public String getOption(String option, ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_196 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void contextCreated() {\n RequestContext context = parser.parseRequest(mockRequestHeaders, RequestType.FRAGMENTER);\n\n assertEquals(System.getProperty(\"greenplum.alignment\"), \"all\");\n assertEquals(context.getTotalSegments(), 2);\n assertEquals(context.get... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_315 | {
"fields": [
{
"declarator": "hiveColumn",
"modifier": "",
"original_string": "FieldSchema hiveColumn;",
"type": "FieldSchema",
"var_name": "hiveColumn"
},
{
"declarator": "typesMappings = {\n /* hive type -> gpdb type */\n {\"tinyint\", \"int2\"}... | {
"body": "@Test\n public void testCompatibleHiveType() {\n\n String compatibleTypeName = HiveUtilities.toCompatibleHiveType(DataType.BOOLEAN, null);\n assertEquals(compatibleTypeName, EnumHiveToGpdbType.BooleanType.getTypeName());\n\n compatibleTypeName = HiveUtilities.toCompatibleHiveType(Da... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HiveUtilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HiveUtilities.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public static String toCompatibleHiveType(DataType type, Integer[] modifiers) {\n\n EnumHiveToGpdbType hiveToGpdbType = EnumHiveToGpdbType.getCompatibleHiveToGpdbType(type);\n return EnumHiveToGpdbType.getFullHiveTypeName(hiveToGpdbType, modifiers);\n }",
"class_method_signature": "HiveU... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_250 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WithUserProvidedSchema_Json_OnClasspath_Spaces() {\n context.setRequestType(RequestContext.RequestType.READ_BRIDGE);\n context.addOption(\"SCHEMA\", \"avro/user provided.avsc\");\n\n schema = avroUtilities.obtainSchema(context, configurati... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_33 | {
"fields": [
{
"declarator": "gpCSV",
"modifier": "private",
"original_string": "private GreenplumCSV gpCSV;",
"type": "GreenplumCSV",
"var_name": "gpCSV"
},
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_str... | {
"body": "@Test\n public void testToCsvFieldStringWithCharacterThatNeedToBeQuoted() {\n String input1 = \"a\";\n\n // make sure no new object is created\n assertSame(input1, gpCSV.toCsvField(input1, true, true, true));\n\n String input2 = \"\\\"\"; // quote\n assertEquals(\"\\\"... | {
"fields": [
{
"declarator": "QUOTE = '\"'",
"modifier": "private static final",
"original_string": "private static final char QUOTE = '\"';",
"type": "char",
"var_name": "QUOTE"
},
{
"declarator": "ESCAPE = '\"'",
"modifier": "private static final",
"origi... | {
"body": "public String toCsvField(String s, boolean prependQuoteChar, boolean appendQuoteChar) {\n return toCsvField(s, prependQuoteChar, appendQuoteChar, false);\n }",
"class_method_signature": "GreenplumCSV.toCsvField(String s, boolean prependQuoteChar, boolean appendQuoteChar)",
"constructor": fals... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_180 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void missingMandatoryProfileFile() {\n expectedException.expect(ProfileConfException.class);\n expectedException.expectMessage(\"profile/missingMandatoryProfileFile/pxf-profiles-default.xml was not found in the CLASSPATH\");\n\n ProfilesConf profilesConf = getProfiles... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public Map<String, String> getPlugins(String profileName) {\n Profile profile = getProfile(profileName);\n Map<String, String> result = profile.getPluginsMap();\n if (result.isEmpty()) {\n throw new ProfileConfException(NO_PLUGINS_IN_PROFILE_DEF, profileName, ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_303 | {
"fields": [
{
"declarator": "fragmenter",
"modifier": "private",
"original_string": "private Fragmenter fragmenter;",
"type": "Fragmenter",
"var_name": "fragmenter"
},
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestCon... | {
"body": "@Test\n public void testInvalidInputPath() throws Exception {\n expectedException.expect(InvalidInputException.class);\n expectedException.expectMessage(\"Input Pattern file:/tmp/non-existent-path-on-disk/*.csv matches 0 files\");\n\n context.setDataSource(\"/tmp/non-existent-path-o... | {
"fields": [],
"file": "server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/HdfsFileFragmenter.java",
"identifier": "HdfsFileFragmenter",
"interfaces": "",
"methods": [
{
"class_method_signature": "HdfsFileFragmenter.HdfsFileFragmenter()",
"constructor": true,
"full_signature":... | {
"body": "@Override\n public List<Fragment> getFragments() throws Exception {\n String fileName = hcfsType.getDataUri(jobConf, context);\n Path path = new Path(fileName);\n\n PxfInputFormat pxfInputFormat = new PxfInputFormat();\n PxfInputFormat.setInputPaths(jobConf, path);\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_246 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WithUserProvidedSchema_Json_FullPathToLocalFile_Spaces() {\n context.setRequestType(RequestContext.RequestType.READ_BRIDGE);\n context.addOption(\"SCHEMA\", avroDirectory + \"user provided.avsc\");\n\n schema = avroUtilities.obtainSchema(c... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_138 | {
"fields": [
{
"declarator": "mockContext",
"modifier": "private",
"original_string": "private RequestContext mockContext;",
"type": "RequestContext",
"var_name": "mockContext"
},
{
"declarator": "mockBridge",
"modifier": "private",
"original_string": "priv... | {
"body": "@Test\n public void getNextRecord100Records90Percent() throws Exception {\n int expected = 0;\n\n // set the first odd numbers until 20, then all numbers until 100\n // total: 90.\n samplingBitSet.set(0, 100);\n for (int i = 0; i < 10; i++) {\n samplingBitSe... | {
"fields": [
{
"declarator": "sampleBitSet",
"modifier": "private",
"original_string": "private BitSet sampleBitSet;",
"type": "BitSet",
"var_name": "sampleBitSet"
},
{
"declarator": "bitSetSize",
"modifier": "private",
"original_string": "private int bitSe... | {
"body": "@Override\n public Writable getNext() throws Exception {\n Writable output = super.getNext();\n\n // sample - if bit is false, advance to the next object\n while (!sampleBitSet.get(curIndex)) {\n\n if (output == null) {\n break;\n }\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_64 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-api/src/... | {
"body": "@Test\n public void testPruningRightNodeDuringVisit() {\n Node root = new Node();\n Node right = new Node();\n root.setRight(right);\n TreeVisitor visitor = mock(TreeVisitor.class);\n\n // l0\n // |\n // -----------\n // ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(TreeTraverser.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(TreeTraverser.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public Node traverse(Node node, TreeVisitor... visitors) {\n\n if (ArrayUtils.isEmpty(visitors)) {\n throw new IllegalArgumentException(\"You need to provide at least one visitor for this traverser\");\n }\n\n Node result = node;\n for (TreeVisitor visitor : visitors)... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_354 | {
"fields": [],
"file": "server/pxf-jdbc/src/test/java/org/greenplum/pxf/plugins/jdbc/utils/HiveJdbcUtilsTest.java",
"identifier": "HiveJdbcUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testURLWithoutImpersonationPropertyWithQuestionMarkAndWithHash() throws Exception {\n String url = \"jdbc:hive2://server:10000/default;foo=bar;saslQop=auth-conf?hive.question=value#hive.hash=value\";\n assertEquals(\"jdbc:hive2://server:10000/default;foo=bar;saslQop=aut... | {
"fields": [
{
"declarator": "HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\"",
"modifier": "private static final",
"original_string": "private static final String HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\";",
"type": "String",
"var_name": "HIVE_UR... | {
"body": "public static String updateImpersonationPropertyInHiveJdbcUrl(String url, String user) {\n String suffix, prefix = null;\n int terminatorIndex = findTerminatorIndex(url, 0, TERMINATORS_TWO_CHARS);\n\n // impersonation property might already be in the URL\n int impersonationPrope... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_211 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void typeModCountNegativeIntegerFails() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"ATTR-TYPEMOD0-COUNT must be a positive integer\");\n\n parameters.putSingle(\"X-GP-ATTRS\", \"1\");\n parameters.putSingle(\"X-GP-ATTR-NAME0\", \... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_355 | {
"fields": [],
"file": "server/pxf-jdbc/src/test/java/org/greenplum/pxf/plugins/jdbc/utils/HiveJdbcUtilsTest.java",
"identifier": "HiveJdbcUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testURLWithImpersonationPropertyStart() throws Exception {\n String url = \"jdbc:hive2://server:10000/default;hive.server2.proxy.user=bar;otherProperty=otherValue;saslQop=auth-conf\";\n assertEquals(\"jdbc:hive2://server:10000/default;hive.server2.proxy.user=foo;otherPr... | {
"fields": [
{
"declarator": "HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\"",
"modifier": "private static final",
"original_string": "private static final String HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\";",
"type": "String",
"var_name": "HIVE_UR... | {
"body": "public static String updateImpersonationPropertyInHiveJdbcUrl(String url, String user) {\n String suffix, prefix = null;\n int terminatorIndex = findTerminatorIndex(url, 0, TERMINATORS_TWO_CHARS);\n\n // impersonation property might already be in the URL\n int impersonationPrope... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_210 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void typeModCountNonIntegerFails() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"ATTR-TYPEMOD0-COUNT must be an integer\");\n\n parameters.putSingle(\"X-GP-ATTRS\", \"1\");\n parameters.putSingle(\"X-GP-ATTR-NAME0\", \"vc1\");\n ... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_139 | {
"fields": [
{
"declarator": "mockContext",
"modifier": "private",
"original_string": "private RequestContext mockContext;",
"type": "RequestContext",
"var_name": "mockContext"
},
{
"declarator": "mockBridge",
"modifier": "private",
"original_string": "priv... | {
"body": "@Test\n public void getNextRecord350Records50Percent() throws Exception {\n\n // set bits 0, 40-79 (40) and 90-98 (9)\n // total 50.\n samplingBitSet.set(0);\n samplingBitSet.set(40, 80);\n samplingBitSet.set(90, 99);\n recordsLimit = 350;\n when(mockCont... | {
"fields": [
{
"declarator": "sampleBitSet",
"modifier": "private",
"original_string": "private BitSet sampleBitSet;",
"type": "BitSet",
"var_name": "sampleBitSet"
},
{
"declarator": "bitSetSize",
"modifier": "private",
"original_string": "private int bitSe... | {
"body": "@Override\n public Writable getNext() throws Exception {\n Writable output = super.getNext();\n\n // sample - if bit is false, advance to the next object\n while (!sampleBitSet.get(curIndex)) {\n\n if (output == null) {\n break;\n }\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_65 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-api/src/... | {
"body": "@Test\n public void testPruningRightNodeDuringAfter() {\n Node root = new Node();\n Node right = new Node();\n root.setRight(right);\n TreeVisitor visitor = mock(TreeVisitor.class);\n\n // l0\n // |\n // -----------\n // ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(TreeTraverser.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(TreeTraverser.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public Node traverse(Node node, TreeVisitor... visitors) {\n\n if (ArrayUtils.isEmpty(visitors)) {\n throw new IllegalArgumentException(\"You need to provide at least one visitor for this traverser\");\n }\n\n Node result = node;\n for (TreeVisitor visitor : visitors)... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_302 | {
"fields": [
{
"declarator": "fragmenter",
"modifier": "private",
"original_string": "private Fragmenter fragmenter;",
"type": "Fragmenter",
"var_name": "fragmenter"
},
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestCon... | {
"body": "@Test\n public void testFragmenterWilcardPath() throws Exception {\n String path = this.getClass().getClassLoader().getResource(\"csv/\").getPath();\n context.setDataSource(path + \"*.csv\");\n\n fragmenter.initialize(context);\n List<Fragment> fragmentList = fragmenter.getFr... | {
"fields": [],
"file": "server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/HdfsFileFragmenter.java",
"identifier": "HdfsFileFragmenter",
"interfaces": "",
"methods": [
{
"class_method_signature": "HdfsFileFragmenter.HdfsFileFragmenter()",
"constructor": true,
"full_signature":... | {
"body": "@Override\n public List<Fragment> getFragments() throws Exception {\n String fileName = hcfsType.getDataUri(jobConf, context);\n Path path = new Path(fileName);\n\n PxfInputFormat pxfInputFormat = new PxfInputFormat();\n PxfInputFormat.setInputPaths(jobConf, path);\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_247 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WhenUserProvidedSchema_Binary_OnClasspath() {\n context.setRequestType(RequestContext.RequestType.READ_BRIDGE);\n context.addOption(\"SCHEMA\", \"avro/user-provided.avro\");\n\n schema = avroUtilities.obtainSchema(context, configuration, h... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_32 | {
"fields": [
{
"declarator": "gpCSV",
"modifier": "private",
"original_string": "private GreenplumCSV gpCSV;",
"type": "GreenplumCSV",
"var_name": "gpCSV"
},
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_str... | {
"body": "@Test\n public void testToCsvFieldEmptyString() {\n String input = \"\";\n assertSame(input, gpCSV.toCsvField(input, false, false));\n assertEquals(\"\\\"\" + input, gpCSV.toCsvField(input, true, false));\n assertEquals(input + \"\\\"\", gpCSV.toCsvField(input, false, true));... | {
"fields": [
{
"declarator": "QUOTE = '\"'",
"modifier": "private static final",
"original_string": "private static final char QUOTE = '\"';",
"type": "char",
"var_name": "QUOTE"
},
{
"declarator": "ESCAPE = '\"'",
"modifier": "private static final",
"origi... | {
"body": "public String toCsvField(String s, boolean prependQuoteChar, boolean appendQuoteChar) {\n return toCsvField(s, prependQuoteChar, appendQuoteChar, false);\n }",
"class_method_signature": "GreenplumCSV.toCsvField(String s, boolean prependQuoteChar, boolean appendQuoteChar)",
"constructor": fals... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_181 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void missingOptionalProfileFile() {\n ProfilesConf profilesConf = getProfilesConf(\"missingOptionalProfileFile\");\n\n Map<String, String> hbaseProfile = profilesConf.getPlugins(\"HBase\");\n assertEquals(\"Y\", hbaseProfile.get(\"FRAGMENTER\"));\n }",
"class_met... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public Map<String, String> getPlugins(String profileName) {\n Profile profile = getProfile(profileName);\n Map<String, String> result = profile.getPluginsMap();\n if (result.isEmpty()) {\n throw new ProfileConfException(NO_PLUGINS_IN_PROFILE_DEF, profileName, ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_314 | {
"fields": [
{
"declarator": "hiveColumn",
"modifier": "",
"original_string": "FieldSchema hiveColumn;",
"type": "FieldSchema",
"var_name": "hiveColumn"
},
{
"declarator": "typesMappings = {\n /* hive type -> gpdb type */\n {\"tinyint\", \"int2\"}... | {
"body": "@Test\n public void mapHiveTypeWithModifiers() throws Exception {\n /*\n * decimal -> numeric\n * varchar -> varchar\n * char -> bpchar\n */\n for (String[] line : typesWithModifiers) {\n String hiveType = line[0];\n String expectedType... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HiveUtilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HiveUtilities.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public static Metadata.Field mapHiveType(FieldSchema hiveColumn) throws UnsupportedTypeException {\n String fieldName = hiveColumn.getName();\n String hiveType = hiveColumn.getType(); // Type name and modifiers if any\n String hiveTypeName; // Type name\n String[] modifiers = nu... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_251 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WhenUserProvidedSchema_Binary_NotFound() {\n expectedException.expect(RuntimeException.class);\n expectedException.expectMessage(\"Failed to obtain Avro schema from 'user-provided.avro'\");\n context.setRequestType(RequestContext.RequestTy... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_178 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void emptyProfileFile() {\n ProfilesConf profilesConf = getProfilesConf(\"emptyProfileFile\");\n profilesConf.getPlugins(\"HBase\");\n }",
"class_method_signature": "ProfilesConfTest.emptyProfileFile()",
"constructor": false,
"full_signature": "@Test public void emp... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public Map<String, String> getPlugins(String profileName) {\n Profile profile = getProfile(profileName);\n Map<String, String> result = profile.getPluginsMap();\n if (result.isEmpty()) {\n throw new ProfileConfException(NO_PLUGINS_IN_PROFILE_DEF, profileName, ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_24 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "context... | {
"body": "@Test\n public void testReturnDefaultOptionValue() {\n assertEquals(\"bar\", context.getOption(\"foo\", \"bar\"));\n }",
"class_method_signature": "RequestContextTest.testReturnDefaultOptionValue()",
"constructor": false,
"full_signature": "@Test public void testReturnDefaultOptionValue(... | {
"fields": [
{
"declarator": "requestType",
"modifier": "private",
"original_string": "private RequestType requestType;",
"type": "RequestType",
"var_name": "requestType"
},
{
"declarator": "accessor",
"modifier": "private",
"original_string": "private Stri... | {
"body": "public String getOption(String option, String defaultValue) {\n return options.getOrDefault(option, defaultValue);\n }",
"class_method_signature": "RequestContext.getOption(String option, String defaultValue)",
"constructor": false,
"full_signature": "public String getOption(String option, ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_197 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void profileWithDuplicateProperty() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"Profile 'test-profile' already defines: [when YOU get WHAT you WANT, wHEn you trY yOUR bESt]\");\n\n Map<String, String> mockedPlugins = new HashMap<>();\n ... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_343 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testGetFragmentsAndReadFromQueryWithPartitions() throws Exception {\n String serversDirectory = new File(this.getClass().getClassLoader().getResource(\"servers\").toURI()).getCanonicalPath();\n context.getAdditionalConfigProps().put(\"pxf.config.server.directory\", serv... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(JdbcAccessor.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(JdbcAccessor.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarat... | {
"body": "@Override\n public boolean openForRead() throws SQLException, SQLTimeoutException, ParseException {\n if (statementRead != null && !statementRead.isClosed()) {\n return true;\n }\n\n Connection connection = super.getConnection();\n SQLQueryBuilder sqlQueryBuilder =... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_206 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void statsParams() {\n parameters.putSingle(\"X-GP-OPTIONS-STATS-MAX-FRAGMENTS\", \"10101\");\n parameters.putSingle(\"X-GP-OPTIONS-STATS-SAMPLE-RATIO\", \"0.039\");\n\n RequestContext context = parser.parseRequest(mockRequestHeaders, RequestType.FRAGMENTER);\n\n ... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_73 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void invalidRestrictedDirectoryName() {\n assertFalse(Utilities.isValidRestrictedDirectoryName(null));\n assertFalse(Utilities.isValidRestrictedDirectoryName(\"\\0\"));\n assertFalse(Utilities.isValidRestrictedDirectoryName(\"a/a\"));\n assertFalse(Utilities.is... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static boolean isValidRestrictedDirectoryName(String name) {\n return isValidRestrictedDirectoryName(name, true);\n }",
"class_method_signature": "Utilities.isValidRestrictedDirectoryName(String name)",
"constructor": false,
"full_signature": "public static boolean isValidRestrictedD... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_292 | {
"fields": [],
"file": "server/pxf-hdfs/src/test/java/org/greenplum/pxf/plugins/hdfs/utilities/HdfsUtilitiesTest.java",
"identifier": "HdfsUtilitiesTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseFileSplit() throws Exception {\n RequestContext context = new RequestContext();\n context.setDataSource(\"/abc/path/to/data/source\");\n ByteArrayOutputStream bas = new ByteArrayOutputStream();\n ObjectOutputStream os = new ObjectOutputStream(bas)... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HdfsUtilities.class)",
"modifier": "private static",
"original_string": "private static Logger LOG = LoggerFactory.getLogger(HdfsUtilities.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "server/pxf-hdfs/... | {
"body": "public static FileSplit parseFileSplit(RequestContext requestContext) {\n FragmentMetadata metadata = Utilities.parseFragmentMetadata(requestContext);\n return new FileSplit(new Path(requestContext.getDataSource()),\n metadata.getStart(), metadata.getEnd(), (String[]) null);\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_338 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromQuery() throws Exception {\n String serversDirectory = new File(this.getClass().getClassLoader().getResource(\"servers\").toURI()).getCanonicalPath();\n context.getAdditionalConfigProps().put(\"pxf.config.server.directory\", serversDirectory + File.separator... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(JdbcAccessor.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(JdbcAccessor.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarat... | {
"body": "@Override\n public boolean openForRead() throws SQLException, SQLTimeoutException, ParseException {\n if (statementRead != null && !statementRead.isClosed()) {\n return true;\n }\n\n Connection connection = super.getConnection();\n SQLQueryBuilder sqlQueryBuilder =... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_154 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void throwsWhenRequiredTxnIdHeaderIsEmpty() throws Exception {\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"Header X-GP-XID is empty in the request\");\n when(mockServletRequest.getHeader(\"X-GP-USER\")).thenReturn(\"... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecurityServletFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecurityServletFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)\n throws IOException, ServletException {\n\n // retrieve user header and make sure header is present and is not empty\n final String gpdbUser = getHeaderValue(... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_380 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testInvalidNullQuoteString() {\n thrown.expect(RuntimeException.class);\n\n EnumPartition partition = new EnumPartition(COL_RAW, \"enum1\");\n partition.toSqlConstraint(null, dbProduct);\n }",
"class_method_signature": "EnumPartitionTest.testInvalidNullQuote... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "value",
"modifier": "private final"... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n\n StringBuilder sb = new StringBuilder();\n\n String quotedColumn = quoteString + ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_103 | {
"fields": [
{
"declarator": "PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\"",
"modifier": "private static final",
"original_string": "private static final String PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\";",
"type": "String"... | {
"body": "@Test\n public void testServerConfigurationImpersonationOverwritesGlobalFalse() {\n System.setProperty(PROPERTY_KEY_USER_IMPERSONATION, \"true\");\n configuration.set(\"pxf.service.user.impersonation\", \"false\");\n assertFalse(secureLogin.isUserImpersonationEnabled(configuration))... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecureLogin.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecureLogin.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator... | {
"body": "public boolean isUserImpersonationEnabled(Configuration configuration) {\n String valueFromUserImpersonationOnServer = configuration.get(SecureLogin.CONFIG_KEY_SERVICE_USER_IMPERSONATION, System.getProperty(PROPERTY_KEY_USER_IMPERSONATION, \"false\"));\n return StringUtils.equalsIgnoreCase(va... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_396 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-s3/src/t... | {
"body": "@Test\n public void testCompressionTypeGZIP() {\n RequestContext context = getDefaultRequestContext();\n context.addOption(\"COMPRESSION_CODEC\", \"GZIP\");\n\n InputSerialization inputSerialization =\n new S3SelectAccessor().getInputSerialization(context);\n a... | {
"fields": [
{
"declarator": "COMPRESSION_TYPE = \"COMPRESSION_CODEC\"",
"modifier": "public static final",
"original_string": "public static final String COMPRESSION_TYPE = \"COMPRESSION_CODEC\";",
"type": "String",
"var_name": "COMPRESSION_TYPE"
},
{
"declarator": "F... | {
"body": "InputSerialization getInputSerialization(RequestContext context) {\n InputSerialization inputSerialization = new InputSerialization();\n\n // We need to infer the format name from the profile (i.e. s3:parquet\n // would return parquet for the format)\n String format = context.in... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_379 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testExcluded3() {\n EnumPartition partition = new EnumPartition(COL_RAW, new String[]{\"enum1\", \"enum2\", \"enum3\"});\n String constraint = partition.toSqlConstraint(QUOTE, dbProduct);\n\n assertEquals(\"( \\\"col\\\" <> 'enum1' AND \\\"col\\\" <> 'enum2' AND ... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "value",
"modifier": "private final"... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n\n StringBuilder sb = new StringBuilder();\n\n String quotedColumn = quoteString + ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_400 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-s3/src/t... | {
"body": "@Test\n public void testJSONInputSerializationWithDocumentJsonType() {\n RequestContext context = getRequestContext(\"s3:json\");\n context.setFormat(\"json\");\n context.addOption(\"JSON-TYPE\", \"document\");\n\n InputSerialization inputSerialization =\n new ... | {
"fields": [
{
"declarator": "COMPRESSION_TYPE = \"COMPRESSION_CODEC\"",
"modifier": "public static final",
"original_string": "public static final String COMPRESSION_TYPE = \"COMPRESSION_CODEC\";",
"type": "String",
"var_name": "COMPRESSION_TYPE"
},
{
"declarator": "F... | {
"body": "InputSerialization getInputSerialization(RequestContext context) {\n InputSerialization inputSerialization = new InputSerialization();\n\n // We need to infer the format name from the profile (i.e. s3:parquet\n // would return parquet for the format)\n String format = context.in... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_49 | {
"fields": [
{
"declarator": "filterParser",
"modifier": "private",
"original_string": "private FilterParser filterParser;",
"type": "FilterParser",
"var_name": "filterParser"
},
{
"declarator": "filter",
"modifier": "private",
"original_string": "private S... | {
"body": "@Test\n public void parseLogicalNotOperator() throws Exception {\n // NOT (_1_ = 0)\n filter = \"a1c20s1d0o5l2\";\n\n Node result = filterParser.parse(filter);\n assertNotNull(result);\n assertOperatorEquals(Operator.NOT, result);\n assertEquals(1, result.childC... | {
"fields": [
{
"declarator": "index",
"modifier": "private",
"original_string": "private int index;",
"type": "int",
"var_name": "index"
},
{
"declarator": "filterByteArr",
"modifier": "private",
"original_string": "private byte[] filterByteArr;",
"ty... | {
"body": "public Node parse(String filterString) throws Exception {\n\n if (filterString == null) {\n throw new FilterStringSyntaxException(\"filter parsing ended with no result\");\n }\n\n return parse(filterString.getBytes(DEFAULT_CHARSET));\n }",
"class_method_signature": "Fil... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_115 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "resolve... | {
"body": "@Test\n public void testInitialize() {\n resolver.initialize(context);\n }",
"class_method_signature": "JsonResolverTest.testInitialize()",
"constructor": false,
"full_signature": "@Test public void testInitialize()",
"identifier": "testInitialize",
"invocations": [
"initialize"
... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(JsonResolver.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(JsonResolver.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "oneFieldList... | {
"body": "@Override\n public void initialize(RequestContext requestContext) {\n super.initialize(requestContext);\n oneFieldList = new ArrayList<>();\n mapper = new ObjectMapper();\n\n // Precompute the column metadata. The metadata is used for mapping column names to json nodes.\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_284 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromSingleLineCsvFileFileAsRow() throws Exception {\n prepareTest(\"csv/singleline.csv\", true);\n\n OneRow oneRow = accessor.readNextObject();\n assertNotNull(oneRow);\n assertEquals(\"\\\"a,b,c\\\"\", oneRow.getData());\n\n oneRow = access... | {
"fields": [
{
"declarator": "fileAsRow",
"modifier": "private",
"original_string": "private boolean fileAsRow;",
"type": "boolean",
"var_name": "fileAsRow"
},
{
"declarator": "firstLine",
"modifier": "private",
"original_string": "private boolean firstLine... | {
"body": "@Override\n public OneRow readNextObject() throws IOException {\n if (super.readNextObject() == null) /* check if working segment */ {\n return null;\n }\n\n String nextLine = readLine();\n if (nextLine == null) /* EOF */ {\n return null;\n }\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_142 | {
"fields": [],
"file": "server/pxf-service/src/test/java/org/greenplum/pxf/service/utilities/AnalyzeUtilsTest.java",
"identifier": "AnalyzeUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void generateSamplingBitSetBig() throws Exception {\n BitSet result = AnalyzeUtils.generateSamplingBitSet(1000000, 990000);\n assertEquals(result.cardinality(), 990000);\n assertTrue(result.length() < 1000000);\n\n result = AnalyzeUtils.generateSamplingBitSet(1... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(AnalyzeUtils.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(AnalyzeUtils.class);",
"type": "Log",
"var_name": "LOG"
}
],
"file": "server/pxf-service/src/m... | {
"body": "static public BitSet generateSamplingBitSet(int poolSize, int sampleSize) {\n\n int skip = 0, chosen = 0, curIndex = 0;\n BitSet bitSet = new BitSet();\n\n if (poolSize <= 0 || sampleSize <= 0) {\n return bitSet;\n }\n\n if (sampleSize >= poolSize) {\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_0 | {
"fields": [
{
"declarator": "inputStream",
"modifier": "private",
"original_string": "private DataInput inputStream;",
"type": "DataInput",
"var_name": "inputStream"
}
],
"file": "server/pxf-api/src/test/java/org/greenplum/pxf/api/io/GPDBWritableTest.java",
"identifier": ... | {
"body": "@Test\n public void testGetType() {\n String typeName = GPDBWritable.getTypeName(-1);\n assertEquals(typeName, DataType.TEXT.name());\n\n typeName = GPDBWritable.getTypeName(-7777);\n assertEquals(typeName, DataType.TEXT.name());\n\n typeName = GPDBWritable.getTypeName... | {
"fields": [
{
"declarator": "LOG = LogFactory.getLog(GPDBWritable.class)",
"modifier": "private static final",
"original_string": "private static final Log LOG = LogFactory.getLog(GPDBWritable.class);",
"type": "Log",
"var_name": "LOG"
},
{
"declarator": "EOF = -1",
... | {
"body": "public static String getTypeName(int oid) {\n DataType type = DataType.get(oid);\n if (type == DataType.UNSUPPORTED_TYPE)\n return DataType.TEXT.name();\n return type.name();\n }",
"class_method_signature": "GPDBWritable.getTypeName(int oid)",
"constructor": false,
... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_69 | {
"fields": [],
"file": "server/pxf-api/src/test/java/org/greenplum/pxf/api/filter/ColumnIndexOperandNodeTest.java",
"identifier": "ColumnIndexOperandNodeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToString() {\n ColumnIndexOperandNode columnIndexOperandNode = new ColumnIndexOperandNode(10);\n\n assertEquals(\"_10_\", columnIndexOperandNode.toString());\n }",
"class_method_signature": "ColumnIndexOperandNodeTest.testToString()",
"constructor": false,
... | {
"fields": [
{
"declarator": "index",
"modifier": "private final",
"original_string": "private final int index;",
"type": "int",
"var_name": "index"
}
],
"file": "server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/ColumnIndexOperandNode.java",
"identifier": "ColumnI... | {
"body": "@Override\n public String toString() {\n return String.format(\"_%d_\", index);\n }",
"class_method_signature": "ColumnIndexOperandNode.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"invocations": [
"format"
... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_135 | {
"fields": [
{
"declarator": "MINUTES = 60 * 1000L",
"modifier": "private static final",
"original_string": "private static final long MINUTES = 60 * 1000L;",
"type": "long",
"var_name": "MINUTES"
},
{
"declarator": "provider = null",
"modifier": "private",
... | {
"body": "@Test(expected = IllegalStateException.class)\n public void releaseAnEntryNotInTheCache() {\n // this could happen if some caller of the cache calls release twice.\n cache.release(session, false);\n }",
"class_method_signature": "UGICacheTest.releaseAnEntryNotInTheCache()",
"constru... | {
"fields": [
{
"declarator": "NANOS_PER_MILLIS = 1000000",
"modifier": "static final",
"original_string": "static final int NANOS_PER_MILLIS = 1000000;",
"type": "int",
"var_name": "NANOS_PER_MILLIS"
},
{
"declarator": "UGI_CACHE_EXPIRY = 15 * 60 * 1000L",
"modif... | {
"body": "@SuppressWarnings(\"SynchronizationOnLocalVariableOrMethodParameter\")\n public void release(SessionId session, boolean cleanImmediatelyIfNoRefs) {\n\n Entry entry = cache.get(session);\n\n if (entry == null) {\n throw new IllegalStateException(\"Cannot release UGI for this sess... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_86 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void testFragmenterCachePropertyFalse() {\n System.setProperty(PROPERTY_KEY_FRAGMENTER_CACHE, \"false\");\n assertFalse(Utilities.isFragmenterCacheEnabled());\n }",
"class_method_signature": "UtilitiesTest.testFragmenterCachePropertyFalse()",
"constructor": false,
"... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static boolean isFragmenterCacheEnabled() {\n return !StringUtils.equalsIgnoreCase(System.getProperty(PROPERTY_KEY_FRAGMENTER_CACHE, \"true\"), \"false\");\n }",
"class_method_signature": "Utilities.isFragmenterCacheEnabled()",
"constructor": false,
"full_signature": "public static b... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_359 | {
"fields": [],
"file": "server/pxf-jdbc/src/test/java/org/greenplum/pxf/plugins/jdbc/utils/HiveJdbcUtilsTest.java",
"identifier": "HiveJdbcUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testURLWithImpersonationPropertyAndQuestionMark() throws Exception {\n String url = \"jdbc:hive2://server:10000/default;hive.server2.proxy.user=bar?hive.server2.proxy.user=bar\";\n assertEquals(\"jdbc:hive2://server:10000/default;hive.server2.proxy.user=foo?hive.server2... | {
"fields": [
{
"declarator": "HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\"",
"modifier": "private static final",
"original_string": "private static final String HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\";",
"type": "String",
"var_name": "HIVE_UR... | {
"body": "public static String updateImpersonationPropertyInHiveJdbcUrl(String url, String user) {\n String suffix, prefix = null;\n int terminatorIndex = findTerminatorIndex(url, 0, TERMINATORS_TWO_CHARS);\n\n // impersonation property might already be in the URL\n int impersonationPrope... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_162 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void determineRemoteUser_IsLoginUser_Kerberos_NoImpersonation_NoServiceUser() throws Exception {\n expectScenario(true, false, false);\n filter.doFilter(mockServletRequest, mockServletResponse, mockFilterChain);\n verifyScenario(\"login-user\", false);\n }",
"cla... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecurityServletFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecurityServletFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)\n throws IOException, ServletException {\n\n // retrieve user header and make sure header is present and is not empty\n final String gpdbUser = getHeaderValue(... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_28 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "context... | {
"body": "@Test\n public void testReturnsUnmodifiableOptionsMap() {\n thrown.expect(UnsupportedOperationException.class);\n\n Map<String, String> unmodifiableMap = context.getOptions();\n unmodifiableMap.put(\"foo\", \"bar\");\n }",
"class_method_signature": "RequestContextTest.testRetur... | {
"fields": [
{
"declarator": "requestType",
"modifier": "private",
"original_string": "private RequestType requestType;",
"type": "RequestType",
"var_name": "requestType"
},
{
"declarator": "accessor",
"modifier": "private",
"original_string": "private Stri... | {
"body": "public Map<String, String> getOptions() {\n return Collections.unmodifiableMap(options);\n }",
"class_method_signature": "RequestContext.getOptions()",
"constructor": false,
"full_signature": "public Map<String, String> getOptions()",
"identifier": "getOptions",
"invocations": [
"un... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_174 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void testGetHandler() {\n ProfilesConf profilesConf = getProfilesConf(\"testGetProtocol\");\n assertEquals(\"FooProtocolHandler.class\", profilesConf.getHandler(\"with-handler\"));\n assertNull(profilesConf.getHandler(\"foo\"));\n }",
"class_method_signature": "P... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public String getHandler(String profileName) {\n return getProfile(profileName).getHandler();\n }",
"class_method_signature": "ProfilesConf.getHandler(String profileName)",
"constructor": false,
"full_signature": "@Override public String getHandler(String profileName)",
"id... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_318 | {
"fields": [
{
"declarator": "hiveColumn",
"modifier": "",
"original_string": "FieldSchema hiveColumn;",
"type": "FieldSchema",
"var_name": "hiveColumn"
},
{
"declarator": "typesMappings = {\n /* hive type -> gpdb type */\n {\"tinyint\", \"int2\"}... | {
"body": "@Test\n public void mapHiveTypeWithModifiersNegative() throws Exception {\n\n String badHiveType = \"decimal(2)\";\n hiveColumn = new FieldSchema(\"badNumeric\", badHiveType, null);\n try {\n HiveUtilities.mapHiveType(hiveColumn);\n fail(\"should fail with bad ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(HiveUtilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(HiveUtilities.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public static Metadata.Field mapHiveType(FieldSchema hiveColumn) throws UnsupportedTypeException {\n String fieldName = hiveColumn.getName();\n String hiveType = hiveColumn.getType(); // Type name and modifiers if any\n String hiveTypeName; // Type name\n String[] modifiers = nu... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_123 | {
"fields": [
{
"declarator": "MINUTES = 60 * 1000L",
"modifier": "private static final",
"original_string": "private static final long MINUTES = 60 * 1000L;",
"type": "long",
"var_name": "MINUTES"
},
{
"declarator": "provider = null",
"modifier": "private",
... | {
"body": "@Test\n public void getUGIFromEmptyCache() throws Exception {\n UserGroupInformation ugi = cache.getUserGroupInformation(session, false);\n assertNotNull(ugi);\n verify(provider).createRemoteUser(\"the-user\", session);\n }",
"class_method_signature": "UGICacheTest.getUGIFromEm... | {
"fields": [
{
"declarator": "NANOS_PER_MILLIS = 1000000",
"modifier": "static final",
"original_string": "static final int NANOS_PER_MILLIS = 1000000;",
"type": "int",
"var_name": "NANOS_PER_MILLIS"
},
{
"declarator": "UGI_CACHE_EXPIRY = 15 * 60 * 1000L",
"modif... | {
"body": "@SuppressWarnings(\"SynchronizationOnLocalVariableOrMethodParameter\")\n public UserGroupInformation getUserGroupInformation(SessionId session, boolean isProxyUser) throws IOException {\n Integer segmentId = session.getSegmentId();\n String user = session.getUser();\n DelayQueue<Ent... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_90 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void testGetHost() {\n\n assertNull(Utilities.getHost(null));\n assertNull(Utilities.getHost(\"\"));\n assertNull(Utilities.getHost(\" \"));\n assertNull(Utilities.getHost(\":\"));\n assertNull(Utilities.getHost(\"#\"));\n assertNull(Utilities.ge... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static String getHost(String uri) {\n if (StringUtils.isBlank(uri))\n return null;\n\n int start = 0, end = uri.length();\n Matcher matcher = SCHEME_PATTERN.matcher(uri);\n\n if (matcher.find()) {\n // Get the start of the hostname\n start... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_158 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void determineRemoteUser_IsLoginUser_NoKerberos_NoImpersonation_NoServiceUser() throws Exception {\n expectScenario(false, false, false);\n filter.doFilter(mockServletRequest, mockServletResponse, mockFilterChain);\n verifyScenario(\"login-user\", false);\n }",
"... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecurityServletFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecurityServletFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)\n throws IOException, ServletException {\n\n // retrieve user header and make sure header is present and is not empty\n final String gpdbUser = getHeaderValue(... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_271 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnWrite_WithUserProvidedSchema_Json_NotFound_Spaces() {\n expectedException.expect(RuntimeException.class);\n expectedException.expectMessage(\"Failed to obtain Avro schema from 'user provided.avsc'\");\n context.setRequestType(RequestContext.Req... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_334 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromQueryFailsWhenServerDirectoryIsNotSpecified() throws Exception {\n expectedException.expect(IllegalStateException.class);\n expectedException.expectMessage(\"No server configuration directory found for server unknown\");\n context.setServerName(\"unkn... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(JdbcAccessor.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(JdbcAccessor.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarat... | {
"body": "@Override\n public boolean openForRead() throws SQLException, SQLTimeoutException, ParseException {\n if (statementRead != null && !statementRead.isClosed()) {\n return true;\n }\n\n Connection connection = super.getConnection();\n SQLQueryBuilder sqlQueryBuilder =... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_53 | {
"fields": [],
"file": "server/pxf-api/src/test/java/org/greenplum/pxf/api/filter/ScalarOperandNodeTest.java",
"identifier": "ScalarOperandNodeTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToString() {\n ScalarOperandNode scalarOperandNode = new ScalarOperandNode(DataType.VARCHAR, \"abc\");\n\n assertSame(DataType.VARCHAR, scalarOperandNode.getDataType());\n assertEquals(\"abc\", scalarOperandNode.toString());\n }",
"class_method_signature... | {
"fields": [
{
"declarator": "value",
"modifier": "private final",
"original_string": "private final String value;",
"type": "String",
"var_name": "value"
}
],
"file": "server/pxf-api/src/main/java/org/greenplum/pxf/api/filter/ScalarOperandNode.java",
"identifier": "Scalar... | {
"body": "@Override\n public String toString() {\n return value;\n }",
"class_method_signature": "ScalarOperandNode.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"invocations": [],
"modifiers": "@Override public",
"para... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_226 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void testReadPath() {\n RequestContext context = parser.parseRequest(mockRequestHeaders, RequestType.READ_BRIDGE);\n assertEquals(RequestType.READ_BRIDGE, context.getRequestType());\n }",
"class_method_signature": "HttpRequestParserTest.testReadPath()",
"constructor":... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_363 | {
"fields": [],
"file": "server/pxf-jdbc/src/test/java/org/greenplum/pxf/plugins/jdbc/utils/HiveJdbcUtilsTest.java",
"identifier": "HiveJdbcUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testURLWithSimilarPropertyName() throws Exception {\n String url = \"jdbc:hive2://server:10000/default;non-hive.server2.proxy.user=bar\";\n assertEquals(\"jdbc:hive2://server:10000/default;non-hive.server2.proxy.user=bar;hive.server2.proxy.user=foo\",\n H... | {
"fields": [
{
"declarator": "HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\"",
"modifier": "private static final",
"original_string": "private static final String HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\";",
"type": "String",
"var_name": "HIVE_UR... | {
"body": "public static String updateImpersonationPropertyInHiveJdbcUrl(String url, String user) {\n String suffix, prefix = null;\n int terminatorIndex = findTerminatorIndex(url, 0, TERMINATORS_TWO_CHARS);\n\n // impersonation property might already be in the URL\n int impersonationPrope... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_119 | {
"fields": [
{
"declarator": "parser",
"modifier": "@Mock private",
"original_string": "@Mock private RequestParser parser;",
"type": "RequestParser",
"var_name": "parser"
},
{
"declarator": "fragmenterFactory",
"modifier": "@Mock private",
"original_string... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void getSameFragmenterCallTwiceUsesCache() throws Throwable {\n List<Fragment> fragmentList = new ArrayList<>();\n\n RequestContext context1 = new RequestContext();\n context1.setTransactionId(\"XID-XYZ-123456\");\n context... | {
"fields": [
{
"declarator": "fragmenterFactory",
"modifier": "private",
"original_string": "private FragmenterFactory fragmenterFactory;",
"type": "FragmenterFactory",
"var_name": "fragmenterFactory"
},
{
"declarator": "fragmenterCacheFactory",
"modifier": "priv... | {
"body": "@GET\n @Path(\"getFragments\")\n @Produces(\"application/json\")\n public Response getFragments(@Context final ServletContext servletContext,\n @Context final HttpHeaders headers)\n throws Throwable {\n\n LOG.debug(\"Received FRAGMENTER call\");\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_45 | {
"fields": [
{
"declarator": "filterParser",
"modifier": "private",
"original_string": "private FilterParser filterParser;",
"type": "FilterParser",
"var_name": "filterParser"
},
{
"declarator": "filter",
"modifier": "private",
"original_string": "private S... | {
"body": "@Test\n public void testLongIndexFails() throws Exception {\n thrown.expect(FilterParser.FilterStringSyntaxException.class);\n thrown.expectMessage(\"value 2147483648 larger than intmax ending at 11\");\n\n filter = \"a2147483647o8\";\n filterParser.parse(filter); // succeeds... | {
"fields": [
{
"declarator": "index",
"modifier": "private",
"original_string": "private int index;",
"type": "int",
"var_name": "index"
},
{
"declarator": "filterByteArr",
"modifier": "private",
"original_string": "private byte[] filterByteArr;",
"ty... | {
"body": "public Node parse(String filterString) throws Exception {\n\n if (filterString == null) {\n throw new FilterStringSyntaxException(\"filter parsing ended with no result\");\n }\n\n return parse(filterString.getBytes(DEFAULT_CHARSET));\n }",
"class_method_signature": "Fil... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_230 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "tupleDesc",
"modifier": "private",
"original_string": "private HBaseTupl... | {
"body": "@Test\n\t/*\n\t * Test the convertToJavaObject method\n\t */\n public void testConvertToJavaObject() throws Exception {\n Object result;\n\n context = new RequestContext();\n context.setConfig(\"default\");\n context.setUser(\"test-user\");\n tupleDesc = mock(HBaseTupl... | {
"fields": [
{
"declarator": "tupleDescription",
"modifier": "private",
"original_string": "private HBaseTupleDescription tupleDescription;",
"type": "HBaseTupleDescription",
"var_name": "tupleDescription"
}
],
"file": "server/pxf-hbase/src/main/java/org/greenplum/pxf/plugin... | {
"body": "Object convertToJavaObject(int typeCode, String typeName, byte[] val) throws Exception {\n if (val == null) {\n return null;\n }\n try {\n switch (DataType.get(typeCode)) {\n case TEXT:\n case VARCHAR:\n case BPCHAR:\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_375 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testInvalidNullQuoteString() {\n IntPartition partition = new IntPartition(COL_RAW, 0L, 1L);\n\n thrown.expect(RuntimeException.class);\n\n partition.toSqlConstraint(null, dbProduct);\n }",
"class_method_signature": "IntPartitionTest.testInvalidNullQuoteStri... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "boundaries",
"modifier": "private f... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n\n return generateRangeConstraint(\n quoteString + column + quoteString,\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_12 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "factory... | {
"body": "@Test\n public void testConfigurationSetsServerDirectoryPath() throws IOException {\n Configuration configuration = factory.initConfiguration(\"default\", \"default\", \"dummy\", additionalProperties);\n File defaultServerDirectory = new File(serversDirectory, \"default\");\n\n asse... | {
"fields": [
{
"declarator": "instance = new BaseConfigurationFactory()",
"modifier": "private static final",
"original_string": "private static final BaseConfigurationFactory instance = new BaseConfigurationFactory();",
"type": "BaseConfigurationFactory",
"var_name": "instance"
... | {
"body": "@Override\n public Configuration initConfiguration(String configDirectory, String serverName, String userName, Map<String, String> additionalProperties) {\n // start with built-in Hadoop configuration that loads core-site.xml\n LOG.debug(\"Initializing configuration for server {}\", server... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_267 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnWrite_WithUserProvidedSchema_Json_OnClasspath_Spaces() {\n context.setRequestType(RequestContext.RequestType.WRITE_BRIDGE);\n context.addOption(\"SCHEMA\", \"avro/user provided.avsc\");\n\n schema = avroUtilities.obtainSchema(context, configura... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_288 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromQuotedCsvFileFileAsRow() throws Exception {\n prepareTest(\"csv/quoted.csv\", true);\n\n OneRow oneRow = accessor.readNextObject();\n assertNotNull(oneRow);\n assertEquals(\"\\\"\\\"\\\"1\\\"\\\",\\\"\\\"2\", oneRow.getData());\n\n oneRo... | {
"fields": [
{
"declarator": "fileAsRow",
"modifier": "private",
"original_string": "private boolean fileAsRow;",
"type": "boolean",
"var_name": "fileAsRow"
},
{
"declarator": "firstLine",
"modifier": "private",
"original_string": "private boolean firstLine... | {
"body": "@Override\n public OneRow readNextObject() throws IOException {\n if (super.readNextObject() == null) /* check if working segment */ {\n return null;\n }\n\n String nextLine = readLine();\n if (nextLine == null) /* EOF */ {\n return null;\n }\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_322 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void parseTableQualifiedNameNoDbName() {\n String name = \"orphan\";\n tblDesc = hiveClientWrapper.extractTableFromName(name);\n\n assertEquals(\"default\", tblDesc.getPath());\n assertEquals(name, tblDesc.getName());\n }",
"class_method_signature": "HiveC... | {
"fields": [
{
"declarator": "instance = new HiveClientWrapper()",
"modifier": "private static final",
"original_string": "private static final HiveClientWrapper instance = new HiveClientWrapper();",
"type": "HiveClientWrapper",
"var_name": "instance"
},
{
"declarator"... | {
"body": "public Metadata.Item extractTableFromName(String qualifiedName) {\n List<Metadata.Item> items = extractTablesFromPattern(null, qualifiedName);\n if (items.isEmpty()) {\n throw new IllegalArgumentException(\"No tables found\");\n }\n return items.get(0);\n }",
"cl... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_85 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void testFragmenterCachePropertyFALSE() {\n System.setProperty(PROPERTY_KEY_FRAGMENTER_CACHE, \"FALSE\");\n assertFalse(Utilities.isFragmenterCacheEnabled());\n }",
"class_method_signature": "UtilitiesTest.testFragmenterCachePropertyFALSE()",
"constructor": false,
"... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static boolean isFragmenterCacheEnabled() {\n return !StringUtils.equalsIgnoreCase(System.getProperty(PROPERTY_KEY_FRAGMENTER_CACHE, \"true\"), \"false\");\n }",
"class_method_signature": "Utilities.isFragmenterCacheEnabled()",
"constructor": false,
"full_signature": "public static b... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_136 | {
"fields": [
{
"declarator": "mockContext",
"modifier": "private",
"original_string": "private RequestContext mockContext;",
"type": "RequestContext",
"var_name": "mockContext"
},
{
"declarator": "mockBridge",
"modifier": "private",
"original_string": "priv... | {
"body": "@Test\n public void getNextRecord100Percent() throws Exception {\n\n samplingBitSet.set(0, 100);\n recordsLimit = 100;\n when(mockContext.getStatsSampleRatio()).thenReturn((float) 1.0);\n\n readSamplingBridge = new ReadSamplingBridge(mockContext, mockAccessorFactory, mockReso... | {
"fields": [
{
"declarator": "sampleBitSet",
"modifier": "private",
"original_string": "private BitSet sampleBitSet;",
"type": "BitSet",
"var_name": "sampleBitSet"
},
{
"declarator": "bitSetSize",
"modifier": "private",
"original_string": "private int bitSe... | {
"body": "@Override\n public Writable getNext() throws Exception {\n Writable output = super.getNext();\n\n // sample - if bit is false, advance to the next object\n while (!sampleBitSet.get(curIndex)) {\n\n if (output == null) {\n break;\n }\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_161 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void determineRemoteUser_IsGpdbUser_NoKerberos_Impersonation_ServiceUser() throws Exception {\n expectScenario(false, true, true);\n filter.doFilter(mockServletRequest, mockServletResponse, mockFilterChain);\n verifyScenario(\"gpdb-user\", true);\n }",
"class_met... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecurityServletFilter.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecurityServletFilter.class);",
"type": "Logger",
"var_name": "LOG"
},
... | {
"body": "@Override\n public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain)\n throws IOException, ServletException {\n\n // retrieve user header and make sure header is present and is not empty\n final String gpdbUser = getHeaderValue(... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_248 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WhenUserProvidedSchema_Binary_OnClasspath_Spaces() {\n context.setRequestType(RequestContext.RequestType.READ_BRIDGE);\n context.addOption(\"SCHEMA\", \"avro/user provided.avro\");\n\n schema = avroUtilities.obtainSchema(context, configura... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_198 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void pluginsDefinedByProfileOnly() {\n Map<String, String> mockedPlugins = new HashMap<>();\n mockedPlugins.put(\"fragmenter\", \"test-fragmenter\");\n mockedPlugins.put(\"accessor\", \"test-accessor\");\n mockedPlugins.put(\"resolver\", \"test-resolver\");\n ... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_177 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
}
... | {
"body": "@Test\n public void overrideProfile() {\n ProfilesConf profilesConf = getProfilesConf(\"overrideProfile\");\n Map profile = profilesConf.getPlugins(\"HBase\");\n assertEquals(2, profile.keySet().size());\n assertEquals(\"Y\", profile.get(\"ACCESSOR\"));\n assertEquals(... | {
"fields": [
{
"declarator": "EXTERNAL_PROFILES = \"pxf-profiles.xml\"",
"modifier": "private final static",
"original_string": "private final static String EXTERNAL_PROFILES = \"pxf-profiles.xml\";",
"type": "String",
"var_name": "EXTERNAL_PROFILES"
},
{
"declarator":... | {
"body": "@Override\n public Map<String, String> getPlugins(String profileName) {\n Profile profile = getProfile(profileName);\n Map<String, String> result = profile.getPluginsMap();\n if (result.isEmpty()) {\n throw new ProfileConfException(NO_PLUGINS_IN_PROFILE_DEF, profileName, ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_93 | {
"fields": [
{
"declarator": "PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\"",
"modifier": "private static final",
"original_string": "private static final String PROPERTY_KEY_USER_IMPERSONATION = \"pxf.service.user.impersonation.enabled\";",
"type": "String"... | {
"body": "@Test\n public void testLoginKerberosFailsWhenNoKeytab() throws IOException {\n expectedException.expect(RuntimeException.class);\n expectedException.expectMessage(\"PXF service login failed for server test : Kerberos Security for server test requires a valid keytab file name.\");\n\n ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(SecureLogin.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(SecureLogin.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator... | {
"body": "public UserGroupInformation getLoginUser(RequestContext context, Configuration configuration) throws IOException {\n return getLoginUser(context.getServerName(), context.getConfig(), configuration);\n }",
"class_method_signature": "SecureLogin.getLoginUser(RequestContext context, Configuration ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_120 | {
"fields": [
{
"declarator": "parser",
"modifier": "@Mock private",
"original_string": "@Mock private RequestParser parser;",
"type": "RequestParser",
"var_name": "parser"
},
{
"declarator": "fragmenterFactory",
"modifier": "@Mock private",
"original_string... | {
"body": "@SuppressWarnings(\"unchecked\")\n @Test\n public void testFragmenterCallExpiresAfterTimeout() throws Throwable {\n List<Fragment> fragmentList1 = new ArrayList<>();\n List<Fragment> fragmentList2 = new ArrayList<>();\n\n RequestContext context1 = new RequestContext();\n c... | {
"fields": [
{
"declarator": "fragmenterFactory",
"modifier": "private",
"original_string": "private FragmenterFactory fragmenterFactory;",
"type": "FragmenterFactory",
"var_name": "fragmenterFactory"
},
{
"declarator": "fragmenterCacheFactory",
"modifier": "priv... | {
"body": "@GET\n @Path(\"getFragments\")\n @Produces(\"application/json\")\n public Response getFragments(@Context final ServletContext servletContext,\n @Context final HttpHeaders headers)\n throws Throwable {\n\n LOG.debug(\"Received FRAGMENTER call\");\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_209 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void typeMods() {\n\n parameters.putSingle(\"X-GP-ATTRS\", \"2\");\n parameters.putSingle(\"X-GP-ATTR-NAME0\", \"vc1\");\n parameters.putSingle(\"X-GP-ATTR-TYPECODE0\", \"1043\");\n parameters.putSingle(\"X-GP-ATTR-TYPENAME0\", \"varchar\");\n parameters... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_337 | {
"fields": [
{
"declarator": "expectedException = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException expectedException = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "expectedException"
},
... | {
"body": "@Test\n public void testReadFromQueryFailsWhenQueryFileIsEmpty() throws Exception {\n expectedException.expect(RuntimeException.class);\n expectedException.expectMessage(\"Query text file is empty for query emptyquery\");\n String serversDirectory = new File(this.getClass().getClass... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(JdbcAccessor.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(JdbcAccessor.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarat... | {
"body": "@Override\n public boolean openForRead() throws SQLException, SQLTimeoutException, ParseException {\n if (statementRead != null && !statementRead.isClosed()) {\n return true;\n }\n\n Connection connection = super.getConnection();\n SQLQueryBuilder sqlQueryBuilder =... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_272 | {
"fields": [
{
"declarator": "avroSchemaFileReaderFactory",
"modifier": "private",
"original_string": "private AvroSchemaFileReaderFactory avroSchemaFileReaderFactory;",
"type": "AvroSchemaFileReaderFactory",
"var_name": "avroSchemaFileReaderFactory"
}
],
"file": "server/pxf... | {
"body": "@Test\n public void testGetJsonReader() {\n assertTrue(avroSchemaFileReaderFactory.getAvroSchemaFileReader(\"foobar.avsc\") instanceof JsonAvroSchemaFileReader);\n }",
"class_method_signature": "AvroSchemaFileReaderFactoryTest.testGetJsonReader()",
"constructor": false,
"full_signature":... | {
"fields": [
{
"declarator": "instance = new AvroSchemaFileReaderFactory()",
"modifier": "private static final",
"original_string": "private static final AvroSchemaFileReaderFactory instance = new AvroSchemaFileReaderFactory();",
"type": "AvroSchemaFileReaderFactory",
"var_name": "i... | {
"body": "public AvroSchemaFileReader getAvroSchemaFileReader(String userProvidedSchemaFile) {\n if (userProvidedSchemaFile.matches(\"^.*\\\\.avsc$\")) {\n return new JsonAvroSchemaFileReader();\n }\n return new BinaryAvroSchemaFileReader();\n }",
"class_method_signature": "AvroS... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_50 | {
"fields": [
{
"declarator": "filterParser",
"modifier": "private",
"original_string": "private FilterParser filterParser;",
"type": "FilterParser",
"var_name": "filterParser"
},
{
"declarator": "filter",
"modifier": "private",
"original_string": "private S... | {
"body": "@Test\n public void parseLogicalUnknownCodeError() throws Exception {\n thrown.expect(FilterParser.FilterStringSyntaxException.class);\n thrown.expectMessage(\"unknown op ending at 2\");\n\n filter = \"l7\";\n filterParser.parse(filter);\n }",
"class_method_signature": "... | {
"fields": [
{
"declarator": "index",
"modifier": "private",
"original_string": "private int index;",
"type": "int",
"var_name": "index"
},
{
"declarator": "filterByteArr",
"modifier": "private",
"original_string": "private byte[] filterByteArr;",
"ty... | {
"body": "public Node parse(String filterString) throws Exception {\n\n if (filterString == null) {\n throw new FilterStringSyntaxException(\"filter parsing ended with no result\");\n }\n\n return parse(filterString.getBytes(DEFAULT_CHARSET));\n }",
"class_method_signature": "Fil... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_360 | {
"fields": [],
"file": "server/pxf-jdbc/src/test/java/org/greenplum/pxf/plugins/jdbc/utils/HiveJdbcUtilsTest.java",
"identifier": "HiveJdbcUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testURLWithImpersonationPropertyAndQuestionMark2() throws Exception {\n String url = \"jdbc:hive2://server:10000/default;hive.server2.proxy.user=bar;other-property=value?hive.server2.proxy.user=bar\";\n assertEquals(\"jdbc:hive2://server:10000/default;hive.server2.proxy... | {
"fields": [
{
"declarator": "HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\"",
"modifier": "private static final",
"original_string": "private static final String HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\";",
"type": "String",
"var_name": "HIVE_UR... | {
"body": "public static String updateImpersonationPropertyInHiveJdbcUrl(String url, String user) {\n String suffix, prefix = null;\n int terminatorIndex = findTerminatorIndex(url, 0, TERMINATORS_TWO_CHARS);\n\n // impersonation property might already be in the URL\n int impersonationPrope... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_225 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void testFragmenterPath() {\n RequestContext context = parser.parseRequest(mockRequestHeaders, RequestType.FRAGMENTER);\n assertEquals(RequestType.FRAGMENTER, context.getRequestType());\n }",
"class_method_signature": "HttpRequestParserTest.testFragmenterPath()",
"con... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_46 | {
"fields": [
{
"declarator": "filterParser",
"modifier": "private",
"original_string": "private FilterParser filterParser;",
"type": "FilterParser",
"var_name": "filterParser"
},
{
"declarator": "filter",
"modifier": "private",
"original_string": "private S... | {
"body": "@Test\n public void parseFilterWith2Operations() throws Exception {\n filter = \"a1c25s5dfirsto5a2c20s1d1o2l0\";\n\n Node result = filterParser.parse(filter);\n assertNotNull(result);\n assertOperatorEquals(AND, result);\n assertEquals(2, result.childCount());\n ... | {
"fields": [
{
"declarator": "index",
"modifier": "private",
"original_string": "private int index;",
"type": "int",
"var_name": "index"
},
{
"declarator": "filterByteArr",
"modifier": "private",
"original_string": "private byte[] filterByteArr;",
"ty... | {
"body": "public Node parse(String filterString) throws Exception {\n\n if (filterString == null) {\n throw new FilterStringSyntaxException(\"filter parsing ended with no result\");\n }\n\n return parse(filterString.getBytes(DEFAULT_CHARSET));\n }",
"class_method_signature": "Fil... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_376 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "dbProdu... | {
"body": "@Test\n public void testNormal() {\n EnumPartition partition = new EnumPartition(COL_RAW, \"enum1\");\n String constraint = partition.toSqlConstraint(QUOTE, dbProduct);\n\n assertEquals(\"\\\"col\\\" = 'enum1'\", constraint);\n }",
"class_method_signature": "EnumPartitionTest.t... | {
"fields": [
{
"declarator": "serialVersionUID = 0L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 0L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "value",
"modifier": "private final"... | {
"body": "@Override\n public String toSqlConstraint(String quoteString, DbProduct dbProduct) {\n if (quoteString == null) {\n throw new RuntimeException(\"Quote string cannot be null\");\n }\n\n StringBuilder sb = new StringBuilder();\n\n String quotedColumn = quoteString + ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_233 | {
"fields": [
{
"declarator": "PRUNER = new SupportedOperatorPruner(SUPPORTED_OPERATORS)",
"modifier": "private static final",
"original_string": "private static final TreeVisitor PRUNER = new SupportedOperatorPruner(SUPPORTED_OPERATORS);",
"type": "TreeVisitor",
"var_name": "PRUNER"... | {
"body": "@Test\n public void parseIsNotNullExpression() throws Exception {\n Filter filter = helper(\"a1o9\", tupleDescription);\n assertTrue(filter instanceof SingleColumnValueFilter);\n\n SingleColumnValueFilter result = (SingleColumnValueFilter) filter;\n assertNotNull(result);\n ... | {
"fields": [
{
"declarator": "OPERATORS_MAP =\n Collections.unmodifiableMap(new HashMap<Operator, CompareFilter.CompareOp>() {{\n put(Operator.LESS_THAN, CompareFilter.CompareOp.LESS); // \"<\"\n put(Operator.GREATER_THAN, CompareFilter.CompareOp.GREATER); // \">\"\... | {
"body": "private ByteArrayComparable getComparator(int type, OperandNode data) {\n ByteArrayComparable result;\n switch (DataType.get(type)) {\n case TEXT:\n result = new BinaryComparator(Bytes.toBytes(data.toString()));\n break;\n case SMALLINT:\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_399 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-s3/src/t... | {
"body": "@Test\n public void testJSONInputSerialization() {\n RequestContext context = getRequestContext(\"s3:json\");\n context.setFormat(\"json\");\n\n InputSerialization inputSerialization =\n new S3SelectAccessor().getInputSerialization(context);\n assertNotNull(inp... | {
"fields": [
{
"declarator": "COMPRESSION_TYPE = \"COMPRESSION_CODEC\"",
"modifier": "public static final",
"original_string": "public static final String COMPRESSION_TYPE = \"COMPRESSION_CODEC\";",
"type": "String",
"var_name": "COMPRESSION_TYPE"
},
{
"declarator": "F... | {
"body": "InputSerialization getInputSerialization(RequestContext context) {\n InputSerialization inputSerialization = new InputSerialization();\n\n // We need to infer the format name from the profile (i.e. s3:parquet\n // would return parquet for the format)\n String format = context.in... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_11 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
},
{
"declarator": "factory... | {
"body": "@Test\n public void testConfigurationSetsResourcePath() throws MalformedURLException {\n Configuration configuration = factory.initConfiguration(\"default\", \"default\", \"dummy\", additionalProperties);\n File defaultServerDirectory = new File(serversDirectory, \"default\");\n\n a... | {
"fields": [
{
"declarator": "instance = new BaseConfigurationFactory()",
"modifier": "private static final",
"original_string": "private static final BaseConfigurationFactory instance = new BaseConfigurationFactory();",
"type": "BaseConfigurationFactory",
"var_name": "instance"
... | {
"body": "@Override\n public Configuration initConfiguration(String configDirectory, String serverName, String userName, Map<String, String> additionalProperties) {\n // start with built-in Hadoop configuration that loads core-site.xml\n LOG.debug(\"Initializing configuration for server {}\", server... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_321 | {
"fields": [],
"file": "server/pxf-hive/src/test/java/org/greenplum/pxf/plugins/hive/utilities/ProfileFactoryTest.java",
"identifier": "ProfileFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void get() throws Exception {\n\n // For TextInputFormat when table has no complex types, HiveText profile should be used\n String profileName = ProfileFactory.get(new TextInputFormat(), false);\n assertEquals(\"HiveText\", profileName);\n\n // For TextInputFor... | {
"fields": [
{
"declarator": "HIVE_TEXT_PROFILE = \"HiveText\"",
"modifier": "private static final",
"original_string": "private static final String HIVE_TEXT_PROFILE = \"HiveText\";",
"type": "String",
"var_name": "HIVE_TEXT_PROFILE"
},
{
"declarator": "HIVE_RC_PROFIL... | {
"body": "public static String get(InputFormat inputFormat, boolean hasComplexTypes, String userProfileName) {\n String profileName = null;\n if (HIVE_ORC_VECTORIZED_PROFILE.equals(userProfileName))\n return userProfileName;\n if (inputFormat instanceof TextInputFormat && !hasComplexT... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_264 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnWrite_WithUserProvidedSchema_Binary_OnClasspath() {\n context.setRequestType(RequestContext.RequestType.WRITE_BRIDGE);\n context.addOption(\"SCHEMA\", \"avro/user-provided.avro\");\n\n schema = avroUtilities.obtainSchema(context, configuration,... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_213 | {
"fields": [
{
"declarator": "parameters",
"modifier": "private",
"original_string": "private MultivaluedMap<String, String> parameters;",
"type": "MultivaluedMap<String, String>",
"var_name": "parameters"
},
{
"declarator": "parser",
"modifier": "private",
... | {
"body": "@Test\n public void providedTypeModsLessThanTypeModCountFails() {\n thrown.expect(IllegalArgumentException.class);\n thrown.expectMessage(\"Property ATTR-TYPEMOD0-1 has no value in the current request\");\n\n parameters.putSingle(\"X-GP-ATTRS\", \"1\");\n parameters.putSingle... | {
"fields": [
{
"declarator": "TRUE_LCASE = \"true\"",
"modifier": "private static final",
"original_string": "private static final String TRUE_LCASE = \"true\";",
"type": "String",
"var_name": "TRUE_LCASE"
},
{
"declarator": "FALSE_LCASE = \"false\"",
"modifier":... | {
"body": "@Override\n public RequestContext parseRequest(HttpHeaders request, RequestContext.RequestType requestType) {\n\n RequestMap params = new RequestMap(request.getRequestHeaders());\n\n if (LOG.isDebugEnabled()) {\n // Logging only keys to prevent sensitive data to be logged\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_356 | {
"fields": [],
"file": "server/pxf-jdbc/src/test/java/org/greenplum/pxf/plugins/jdbc/utils/HiveJdbcUtilsTest.java",
"identifier": "HiveJdbcUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testURLWithImpersonationPropertyMiddle() throws Exception {\n String url = \"jdbc:hive2://server:10000/default;otherProperty=otherValue;hive.server2.proxy.user=bar;saslQop=auth-conf\";\n assertEquals(\"jdbc:hive2://server:10000/default;otherProperty=otherValue;hive.serv... | {
"fields": [
{
"declarator": "HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\"",
"modifier": "private static final",
"original_string": "private static final String HIVE_URL_IMPERSONATION_PROPERTY = \";hive.server2.proxy.user\";",
"type": "String",
"var_name": "HIVE_UR... | {
"body": "public static String updateImpersonationPropertyInHiveJdbcUrl(String url, String user) {\n String suffix, prefix = null;\n int terminatorIndex = findTerminatorIndex(url, 0, TERMINATORS_TWO_CHARS);\n\n // impersonation property might already be in the URL\n int impersonationPrope... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_89 | {
"fields": [
{
"declarator": "PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\"",
"modifier": "private",
"original_string": "private String PROPERTY_KEY_FRAGMENTER_CACHE = \"pxf.service.fragmenter.cache.enabled\";",
"type": "String",
"var_name": "PROPERTY_KEY_... | {
"body": "@Test\n public void testSecurityIsEnabledWithKerberosAuthentication() {\n Configuration configuration = new Configuration();\n configuration.set(\"hadoop.security.authentication\", \"kerberos\");\n assertTrue(Utilities.isSecurityEnabled(configuration));\n }",
"class_method_sign... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(Utilities.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(Utilities.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"declarator": "... | {
"body": "public static boolean isSecurityEnabled(Configuration configuration) {\n return SecurityUtil.getAuthenticationMethod(configuration) !=\n UserGroupInformation.AuthenticationMethod.SIMPLE;\n }",
"class_method_signature": "Utilities.isSecurityEnabled(Configuration configuration)",
... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_66 | {
"fields": [
{
"declarator": "thrown = ExpectedException.none()",
"modifier": "@Rule\n public",
"original_string": "@Rule\n public ExpectedException thrown = ExpectedException.none();",
"type": "ExpectedException",
"var_name": "thrown"
}
],
"file": "server/pxf-api/src/... | {
"body": "@Test\n public void testPruningRootNodeAndPromotingLeftChildToRootDuringVisit() {\n Node root = new Node();\n Node left = new Node();\n root.setLeft(left);\n TreeVisitor visitor = mock(TreeVisitor.class);\n\n // l0\n // |\n // ... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(TreeTraverser.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(TreeTraverser.class);",
"type": "Logger",
"var_name": "LOG"
}
],
"file": "serv... | {
"body": "public Node traverse(Node node, TreeVisitor... visitors) {\n\n if (ArrayUtils.isEmpty(visitors)) {\n throw new IllegalArgumentException(\"You need to provide at least one visitor for this traverser\");\n }\n\n Node result = node;\n for (TreeVisitor visitor : visitors)... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_244 | {
"fields": [
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestContext context;",
"type": "RequestContext",
"var_name": "context"
},
{
"declarator": "schema",
"modifier": "private",
"original_string": "private Schema schem... | {
"body": "@Test\n public void testObtainSchema_OnRead_WithUserProvidedSchema_Binary_FullPathToLocalFile_Spaces() {\n context.setRequestType(RequestContext.RequestType.READ_BRIDGE);\n context.addOption(\"SCHEMA\", avroDirectory + \"user provided.avro\");\n\n schema = avroUtilities.obtainSchema... | {
"fields": [
{
"declarator": "COMMON_NAMESPACE = \"public.avro\"",
"modifier": "private static",
"original_string": "private static String COMMON_NAMESPACE = \"public.avro\";",
"type": "String",
"var_name": "COMMON_NAMESPACE"
},
{
"declarator": "fileSearcher",
"m... | {
"body": "public Schema obtainSchema(RequestContext context, Configuration configuration, HcfsType hcfsType) {\n Schema schema = (Schema) context.getMetadata();\n\n if (schema != null) {\n return schema;\n }\n try {\n schemaPath = context.getDataSource();\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
146510094_301 | {
"fields": [
{
"declarator": "fragmenter",
"modifier": "private",
"original_string": "private Fragmenter fragmenter;",
"type": "Fragmenter",
"var_name": "fragmenter"
},
{
"declarator": "context",
"modifier": "private",
"original_string": "private RequestCon... | {
"body": "@Test\n public void testFragmenterReturnsListOfFiles() throws Exception {\n String path = this.getClass().getClassLoader().getResource(\"csv/\").getPath();\n context.setDataSource(path);\n\n fragmenter.initialize(context);\n List<Fragment> fragmentList = fragmenter.getFragmen... | {
"fields": [],
"file": "server/pxf-hdfs/src/main/java/org/greenplum/pxf/plugins/hdfs/HdfsFileFragmenter.java",
"identifier": "HdfsFileFragmenter",
"interfaces": "",
"methods": [
{
"class_method_signature": "HdfsFileFragmenter.HdfsFileFragmenter()",
"constructor": true,
"full_signature":... | {
"body": "@Override\n public List<Fragment> getFragments() throws Exception {\n String fileName = hcfsType.getDataUri(jobConf, context);\n Path path = new Path(fileName);\n\n PxfInputFormat pxfInputFormat = new PxfInputFormat();\n PxfInputFormat.setInputPaths(jobConf, path);\n\n ... | {
"created": "8/28/2018 9:42:19 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 146510094,
"size": null,
"stargazer_count": null,
"stars": 14,
"updates": "2020-01-25T19:21:50+00:00",
"url": "https://github.com/greenplum-db/pxf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.