Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
ShowDbsStmt.java
Go to the documentation of this file.
1
// Copyright 2012 Cloudera Inc.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
package
com.cloudera.impala.analysis;
16
17
import
com.cloudera.impala.common.AnalysisException
;
18
import
com.cloudera.impala.thrift.TShowDbsParams;
19
30
public
class
ShowDbsStmt
extends
StatementBase
{
31
// Pattern to match tables against. | denotes choice, * matches all strings
32
private
final
String
pattern_
;
33
38
public
ShowDbsStmt
() {
39
this
(null);
40
}
41
46
public
ShowDbsStmt
(String pattern) {
47
this.pattern_ = pattern;
48
}
49
50
public
String
getPattern
() {
return
pattern_
; }
51
52
@Override
53
public
String
toSql
() {
54
if
(
pattern_
== null) {
55
return
"SHOW DATABASES"
;
56
}
else
{
57
return
"SHOW DATABASES LIKE '"
+
pattern_
+
"'"
;
58
}
59
}
60
61
@Override
62
public
void
analyze
(
Analyzer
analyzer)
throws
AnalysisException
{
63
// Nothing to do here
64
}
65
66
public
TShowDbsParams
toThrift
() {
67
TShowDbsParams params =
new
TShowDbsParams();
68
params.setShow_pattern(
getPattern
());
69
return
params;
70
}
71
}
com.cloudera.impala.analysis.ShowDbsStmt.toThrift
TShowDbsParams toThrift()
Definition:
ShowDbsStmt.java:66
com.cloudera.impala.common.AnalysisException
Definition:
AnalysisException.java:21
com.cloudera.impala.analysis.ShowDbsStmt
Definition:
ShowDbsStmt.java:30
com.cloudera.impala.analysis.ShowDbsStmt.ShowDbsStmt
ShowDbsStmt()
Definition:
ShowDbsStmt.java:38
com.cloudera.impala.analysis.StatementBase
Definition:
StatementBase.java:22
com.cloudera.impala.analysis.ShowDbsStmt.analyze
void analyze(Analyzer analyzer)
Definition:
ShowDbsStmt.java:62
com.cloudera.impala.analysis.ShowDbsStmt.toSql
String toSql()
Definition:
ShowDbsStmt.java:53
com.cloudera.impala.analysis.Analyzer
Definition:
Analyzer.java:105
com.cloudera.impala.analysis.ShowDbsStmt.pattern_
final String pattern_
Definition:
ShowDbsStmt.java:32
com.cloudera.impala.analysis.ShowDbsStmt.getPattern
String getPattern()
Definition:
ShowDbsStmt.java:50
com.cloudera.impala.analysis.ShowDbsStmt.ShowDbsStmt
ShowDbsStmt(String pattern)
Definition:
ShowDbsStmt.java:46
fe
src
main
java
com
cloudera
impala
analysis
ShowDbsStmt.java
Generated on Thu May 7 2015 16:10:38 for Impala by
1.8.6