Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
com.cloudera.impala.testutil.TestFileParser.TestCase Class Reference
Collaboration diagram for com.cloudera.impala.testutil.TestFileParser.TestCase:

Public Member Functions

 TestCase (int lineNum)
 
int getStartingLineNum ()
 
ArrayList< String > getSectionContents (Section section)
 
ArrayList< String > getSectionContents (Section section, boolean withComments)
 
ArrayList< String > getSectionContents (Section section, boolean withComments, String dbSuffix)
 
String getSectionAsString (Section section, boolean withComments, String delimiter)
 
String getSectionAsString (Section section, boolean withComments, String delimiter, String dbSuffix)
 
String getQuery ()
 
boolean isValid ()
 

Protected Member Functions

void addSection (Section section, ArrayList< String > contents)
 

Private Attributes

final EnumMap< Section,
ArrayList< String > > 
expectedResultSections
 
final int startLineNum
 

Detailed Description

A container class for a single test case's sections. A section is a list of strings.

Definition at line 81 of file TestFileParser.java.

Constructor & Destructor Documentation

com.cloudera.impala.testutil.TestFileParser.TestCase.TestCase ( int  lineNum)
inline

Member Function Documentation

void com.cloudera.impala.testutil.TestFileParser.TestCase.addSection ( Section  section,
ArrayList< String >  contents 
)
inlineprotected

Definition at line 97 of file TestFileParser.java.

String com.cloudera.impala.testutil.TestFileParser.TestCase.getQuery ( )
inline
String com.cloudera.impala.testutil.TestFileParser.TestCase.getSectionAsString ( Section  section,
boolean  withComments,
String  delimiter 
)
inline
String com.cloudera.impala.testutil.TestFileParser.TestCase.getSectionAsString ( Section  section,
boolean  withComments,
String  delimiter,
String  dbSuffix 
)
inline

Returns a section concatenated into a single string, with the supplied delimiter used to separate each line.

Definition at line 159 of file TestFileParser.java.

References com.cloudera.impala.testutil.TestFileParser.TestCase.getSectionContents().

ArrayList<String> com.cloudera.impala.testutil.TestFileParser.TestCase.getSectionContents ( Section  section)
inline

Returns a section corresponding to the given key, or an empty list if one does not exist. Comments are not included.

Definition at line 105 of file TestFileParser.java.

Referenced by com.cloudera.impala.testutil.TestFileParser.TestCase.getSectionAsString(), com.cloudera.impala.testutil.TestFileParser.TestCase.getSectionContents(), and com.cloudera.impala.testutil.TestFileParser.TestCase.isValid().

ArrayList<String> com.cloudera.impala.testutil.TestFileParser.TestCase.getSectionContents ( Section  section,
boolean  withComments 
)
inline
ArrayList<String> com.cloudera.impala.testutil.TestFileParser.TestCase.getSectionContents ( Section  section,
boolean  withComments,
String  dbSuffix 
)
inline

Returns a section corresponding to the given key, or an empty list if one does not exist.

Parameters
sectionThe Section to get
withCommentsIf set, all comment lines are included.
dbSuffixIf set, table names that contain the string $DATABASE will be replaced with the specified table suffix
Returns
Collection of strings mapping to lines in the test file

Definition at line 125 of file TestFileParser.java.

int com.cloudera.impala.testutil.TestFileParser.TestCase.getStartingLineNum ( )
inline

Member Data Documentation

final EnumMap<Section, ArrayList<String> > com.cloudera.impala.testutil.TestFileParser.TestCase.expectedResultSections
private
Initial value:
=
Maps.newEnumMap(Section.class)

Definition at line 83 of file TestFileParser.java.

final int com.cloudera.impala.testutil.TestFileParser.TestCase.startLineNum
private

The documentation for this class was generated from the following file: