Yang, Tong 6182f91ba8 MRS component operation guide_normal 2.0.38.SP20 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-12-09 14:55:21 +00:00

22 lines
1.5 KiB
HTML

<a name="mrs_01_2033"></a><a name="mrs_01_2033"></a>
<h1 class="topictitle1">Why the Operation Fails When the Table Name Is TABLE?</h1>
<div id="body1595920221400"><div class="section" id="mrs_01_2033__sb7d82e1639b444a5877309da933aa5de"><h4 class="sectiontitle">Question</h4><p id="mrs_01_2033__a581a687d35a24d8a835f8efaad552a8d">When the table name is set to <strong id="mrs_01_2033__a12746c1a09f445da95eb0c6d489f61e7">table</strong>, why the error information similar to the following is displayed after the <b><span class="cmdname" id="mrs_01_2033__cmdname174203283232">drop table table</span></b> command or other command is run?</p>
<pre class="screen" id="mrs_01_2033__s44069186ec614232accd7f399c7713bf">16/07/12 18:56:29 ERROR SparkSQLDriver: Failed in [drop table table]
java.lang.RuntimeException: [1.1] failure: identifier expected
table
^
at scala.sys.package$.error(package.scala:27)
at org.apache.spark.sql.catalyst.SqlParserTrait$class.parseTableIdentifier(SqlParser.scala:56)
at org.apache.spark.sql.catalyst.SqlParser$.parseTableIdentifier(SqlParser.scala:485)</pre>
</div>
<div class="section" id="mrs_01_2033__sca6e8b6950dd4509ac930e5a6feaeaaa"><h4 class="sectiontitle">Answer</h4><p id="mrs_01_2033__a1363c3f9b07742a083142b2beed8adda">The word table is a keyword of Spark SQL statements and must not be used as a table name.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_2022.html">Spark SQL and DataFrame</a></div>
</div>
</div>