Commit db2c291
[KYUUBI #7398] SERDEPROPERTIES are missing when KSHC create table
### Why are the changes needed?
1. Execute the following SQL to create table and insert.
```
CREATE TABLE test_table (name STRING, age INT)
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe'
WITH SERDEPROPERTIES ('field.delim' = ',')
STORED AS TEXTFILE;
INSERT INTO TABLE test_table VALUES ('alice', 30);
```
2. Check the underlying HDFS data. Output is `alice30`, Expected is `alice,30`
```
hdfs dfs -cat /usr/hive/warehouse/test_table/part-00000-08cdc3f0-15af-413a-a709-46e24f1ace91-c000
```
3. Cause: SERDEPROPERTIES are missing when KSHC create table, it did not strip the `option.` prefix. See: apache/spark#28026
### How was this patch tested?
UT
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #7399 from maomaodev/kyuubi-7398.
Closes #7398
815f60a [lifumao] add toOptionsAndSerdeProps ut
66b8fcd [lifumao] add toOptionsAndSerdeProps ut
11fc7b1 [lifumao] SERDEPROPERTIES are missing when KSHC create table
490009d [lifumao] SERDEPROPERTIES are missing when KSHC create table
3d2060c [lifumao] SERDEPROPERTIES are missing when KSHC create table
00fce8e [lifumao] SERDEPROPERTIES are missing when KSHC create table
ecacba7 [lifumao] SERDEPROPERTIES are missing when KSHC create table
Authored-by: lifumao <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>1 parent f8bc00a commit db2c291
2 files changed
Lines changed: 77 additions & 17 deletions
File tree
- extensions/spark/kyuubi-spark-connector-hive/src
- main/scala/org/apache/kyuubi/spark/connector/hive
- test/scala/org/apache/kyuubi/spark/connector/hive
Lines changed: 37 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| 320 | + | |
| 321 | + | |
320 | 322 | | |
321 | 323 | | |
322 | 324 | | |
323 | 325 | | |
324 | | - | |
325 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
326 | 329 | | |
327 | 330 | | |
328 | 331 | | |
| |||
339 | 342 | | |
340 | 343 | | |
341 | 344 | | |
342 | | - | |
| 345 | + | |
343 | 346 | | |
344 | 347 | | |
345 | 348 | | |
| |||
431 | 434 | | |
432 | 435 | | |
433 | 436 | | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
438 | 456 | | |
439 | 457 | | |
440 | 458 | | |
| |||
583 | 601 | | |
584 | 602 | | |
585 | 603 | | |
586 | | - | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
587 | 607 | | |
588 | 608 | | |
589 | | - | |
| 609 | + | |
590 | 610 | | |
591 | 611 | | |
592 | 612 | | |
593 | 613 | | |
594 | | - | |
| 614 | + | |
595 | 615 | | |
596 | 616 | | |
597 | 617 | | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
603 | 623 | | |
604 | 624 | | |
605 | 625 | | |
| |||
609 | 629 | | |
610 | 630 | | |
611 | 631 | | |
612 | | - | |
| 632 | + | |
613 | 633 | | |
614 | 634 | | |
615 | 635 | | |
| |||
619 | 639 | | |
620 | 640 | | |
621 | 641 | | |
622 | | - | |
| 642 | + | |
623 | 643 | | |
624 | 644 | | |
625 | 645 | | |
| |||
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
290 | 330 | | |
291 | 331 | | |
292 | 332 | | |
| |||
0 commit comments